From 2aab983fff209d5b696beb8d37564aeba9a6d7b3 Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Wed, 19 Oct 2016 17:00:33 +0900 Subject: update doc about `change_column_default` [ci skip] Follow up to #20018. --- activerecord/lib/active_record/migration.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'activerecord') 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 # # * change_column(table_name, column_name, type, options): Changes # the column to a different type using the same parameters as add_column. - # * change_column_default(table_name, column_name, default): Sets a - # default value for +column_name+ defined by +default+ on +table_name+. + # * change_column_default(table_name, column_name, default_or_changes): + # Sets a default value for +column_name+ defined by +default_or_changes+ on + # +table_name+. Passing a hash containing :from and :to + # as +default_or_changes+ will make this change reversible in the migration. # * change_column_null(table_name, column_name, null, default = nil): # Sets or removes a +NOT NULL+ constraint on +column_name+. The +null+ flag # indicates whether the value can be +NULL+. See -- cgit v1.2.3