开发者

How can I tell what changes 'rake db:migrate' will apply before applying them?

The command rake db:migrate will apply all relevant new migrations to a database and will list in the output the migrations that were applied.

I'd like to know in advance what migrations will be applied so as to note do开发者_开发百科wn a list of the changes that are expected in a production environment.

Is there an option I can use in conjunction to rake db:migrate that will show me what changes will be applied without actually applying them?


Does rake db:migrate:status (rails 3+ only) fit the bill?


I guess here's the answer: Show pending migrations in rails .

If you are deploying with capistarno, you could add a task similar to this: http://gem-session.com/2010/08/warn-of-pending-migrations-when-deploying-with-capistrano .

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜