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_infotable to find the version number.
An easier way is to add an additional task to Rake (found via the Quoted-Printable):
namespace :db doCopy this code into a file called
desc 'Print the current database migration version number'
task :version => :environment do
db_version.rakeand place it in the
lib/tasksdirectory within your Rails application.
To find out the current version number, simply run:
rake db:versionTechnorati Tags: Rails, Version, Migration, Rake, QuotedPrintable, Andrew Beacock