aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/migration.rb
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2016-10-19 17:00:33 +0900
committeryuuji.yaginuma <yuuji.yaginuma@gmail.com>2016-10-19 17:16:41 +0900
commit2aab983fff209d5b696beb8d37564aeba9a6d7b3 (patch)
treef6500ea4d0f1eba6204c85f7430405ef26e11ca4 /activerecord/lib/active_record/migration.rb
parent8e76f6959efc44c8575b721fdf53d06ea9430fed (diff)
downloadrails-2aab983fff209d5b696beb8d37564aeba9a6d7b3.tar.gz
rails-2aab983fff209d5b696beb8d37564aeba9a6d7b3.tar.bz2
rails-2aab983fff209d5b696beb8d37564aeba9a6d7b3.zip
update doc about `change_column_default` [ci skip]
Follow up to #20018.
Diffstat (limited to 'activerecord/lib/active_record/migration.rb')
-rw-r--r--activerecord/lib/active_record/migration.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/migration.rb b/activerecord/lib/active_record/migration.rb
index 627e93b5b6..f333769159 100644
--- a/activerecord/lib/active_record/migration.rb
+++ b/activerecord/lib/active_record/migration.rb
@@ -278,8 +278,10 @@ module ActiveRecord
#
# * <tt>change_column(table_name, column_name, type, options)</tt>: Changes
# the column to a different type using the same parameters as add_column.
- # * <tt>change_column_default(table_name, column_name, default)</tt>: Sets a
- # default value for +column_name+ defined by +default+ on +table_name+.
+ # * <tt>change_column_default(table_name, column_name, default_or_changes)</tt>:
+ # Sets a default value for +column_name+ defined by +default_or_changes+ on
+ # +table_name+. Passing a hash containing <tt>:from</tt> and <tt>:to</tt>
+ # as +default_or_changes+ will make this change reversible in the migration.
# * <tt>change_column_null(table_name, column_name, null, default = nil)</tt>:
# Sets or removes a +NOT NULL+ constraint on +column_name+. The +null+ flag
# indicates whether the value can be +NULL+. See