When you want to revert your Rails migration you need the version number so that you can perform the rollback: rake db:migration VERSION=? One way is to access the database and take a look in the schema_info table to find the version number. An easier way is to add an additional task to Rake (found via the Quoted-Printable ): namespace :db do desc 'Print the current database migration version number' task :version => :environment do puts ActiveRecord::Migrator.current_version end end Copy this code into a file called db_version.rake and place it in the lib/tasks directory within your Rails application. To find out the current version number, simply run: rake db:version Technorati Tags: Rails , Version , Migration , Rake , QuotedPrintable , Andrew Beacock
eng mgr / leader / full stack / java / agile / tdd / security / aws / go