rake migrate.db question

Added by Dawes Graybeal almost 6 years ago

This is more of a rails question but has to do with my Redmine installation, so I'm asking here. Hope someone can help. Question: if database.yml points to a different database than when rake dbmigrate was first executed, will it migrate info to the new database? Or will it see as already having been migrated (since was run before on different database)? I'm a newbie, hope this question makes sense. If it sees this as already having been run, how do I get rake db:migrate to migrate 'everything' to new database?

Replies (1)

RE: rake migrate.db question - Added by Leonel Iturralde almost 6 years ago

Dawes Graybeal wrote:

Question: if database.yml points to a different database than when rake dbmigrate was first executed, will it migrate info to the new database? Or will it see as already having been migrated (since was run before on different database)? I'm a newbie, hope this question makes sense. If it sees this as already having been run, how do I get rake db:migrate to migrate 'everything' to new database?

No, It will not migrate any info from the other database. db:migrate just create or modify the tables already on the database.

My recommendation is to dump the info from one database to the other and then execute db:migrate.

(1-1/1)