But, when I checkout another branch and run rake db:migrate, Ideally the changes made my the migration in the previous branch should be removed from and the details of the new migration should get into This doesn't happen.So, I did a rake db:rollback STEP=5, when I checked out a new branch and then did a db:migrate. ) doesn't exist in branch master (the file with code exists only in branch_1! So you can't rollback DB changes made in branch_1 from branch master. A migration is just a regular Ruby class so you’re not limited to these functions.
Reversing this migration is as simple as dropping the table. You can also use them to fix bad data in the database or populate new fields: method.
It might be you, a month from now, when you’ve massively screwed up your existing database and want to drop it and start fresh.
Be certain of one thing: sooner or later, a new environment come along, even if one doesn’t exist right this moment.
20151019205241_create_users.rb: This has not caused an issue for me in practice, but I thought was supposed to be kept automatically updated, and that it would be important to have it updated in order to recreate the database.
Can anyone help me figure out why it would not be updating?