Reputation: 45285
I have multiple migrations:
Is there any ablity to change all these migrations to one new migration which will create the same database schema?
Upvotes: 2
Views: 949
Reputation: 10412
I think that you can change remove those migrations and create a new one, called for example "initial_schema", where you should put the content of the schema.rb composed by all your previous migrations.
Consider that rails generate a schema.rb for you when you run those migrations.
Then you need to drop all tables in your database and run again rake db:migrate.
Upvotes: 1