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

Jon Cram picture Jon Cram · Sep 8, 2011 · Viewed 21.3k times · Source

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 down 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?

Answer

Benoit Garret picture Benoit Garret · Sep 8, 2011

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