Combining db / migration files

Is there a good way to combine db rails migration files into 1 file per table, apart from manually splitting schema.rb ?

Most of my migration file was created during development and does not represent real data changes. For historical reasons, these files will continue to be available in version control. I am not comfortable storing these junk files.

+5
source share
3 answers

Do not worry. Old migration files do no harm, and they can simplify maintenance. Leave them as they are.

-4
source

, , . , . , .

, , .

.

db/schema.rb ( ) . :

rake db:schema:dump

.

:

rake db:drop
rake db:schema:load

db/schema.rb . .

db

rake -T db

+13

Squasher gem, .

0

All Articles