Search code examples
ruby-on-railsrakedbmigrate

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


Solution

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