aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/migration.rb
diff options
context:
space:
mode:
authorAditya Kapoor <aditya.kapoor@vinsol.com>2014-08-21 01:01:45 +0530
committerAditya Kapoor <aditya.kapoor@vinsol.com>2014-08-21 01:01:45 +0530
commiteb9f1ef84f5236c6a1d4d46d372bf8fe6e2fff58 (patch)
treec620fd93d4287a4276c2da58d1159a4eb7516f30 /activerecord/lib/active_record/migration.rb
parent2b7d67d49df8b88ef4815199f2ce5c11f09fe06f (diff)
downloadrails-eb9f1ef84f5236c6a1d4d46d372bf8fe6e2fff58.tar.gz
rails-eb9f1ef84f5236c6a1d4d46d372bf8fe6e2fff58.tar.bz2
rails-eb9f1ef84f5236c6a1d4d46d372bf8fe6e2fff58.zip
[ci skip] add doc for STEP in migration
Diffstat (limited to 'activerecord/lib/active_record/migration.rb')
-rw-r--r--activerecord/lib/active_record/migration.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/migration.rb b/activerecord/lib/active_record/migration.rb
index 9219d70c65..d0d9304a36 100644
--- a/activerecord/lib/active_record/migration.rb
+++ b/activerecord/lib/active_record/migration.rb
@@ -181,9 +181,12 @@ module ActiveRecord
#
# To roll the database back to a previous migration version, use
# <tt>rake db:migrate VERSION=X</tt> where <tt>X</tt> is the version to which
- # you wish to downgrade. If any of the migrations throw an
- # <tt>ActiveRecord::IrreversibleMigration</tt> exception, that step will fail and you'll
- # have some manual work to do.
+ # you wish to downgrade. Alternatively, you can also use the STEP option if you
+ # wish to rollback last few migrations. <tt>rake db:migrate STEP=2</tt> will rollback
+ # the latest two migrations.
+ #
+ # If any of the migrations throw an <tt>ActiveRecord::IrreversibleMigration</tt> exception,
+ # that step will fail and you'll have some manual work to do.
#
# == Database support
#