For a Rails project, if you are given a DB dump, what's gong to be the way?
In point 2, if I load just the DB dump, and I, then add a new migration to my project. So then, running rake db:migrate
will only run the new migration, since the old migrations have already been run by loading DB dump.
Or, loading a DB dump will have nothing to do with running migrations. A migration will only be marked up if you have run rake db:migrate
?
Note: The DB dumb isn't Rails schema, it has been generated by MySQL, and it contains all the data a fellow developer has.
I would first load the db dump, as it also contains all you data and the current schema structure.
running rake db:migrate will only run the new migration
This depends. If your db dump has a schema_migrations
table, that lists all the previously applied migrations, it will not apply the migrations. Otherwise, it will try to and fail.
You basically need these steps: