diff options
author | प्रथमेश Sonpatki <csonpatki@gmail.com> | 2016-10-19 13:51:07 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-19 13:51:07 +0530 |
commit | 125ecfbbff339c25ff81fdb48739e603b66ce406 (patch) | |
tree | f6500ea4d0f1eba6204c85f7430405ef26e11ca4 | |
parent | 8e76f6959efc44c8575b721fdf53d06ea9430fed (diff) | |
parent | 2aab983fff209d5b696beb8d37564aeba9a6d7b3 (diff) | |
download | rails-125ecfbbff339c25ff81fdb48739e603b66ce406.tar.gz rails-125ecfbbff339c25ff81fdb48739e603b66ce406.tar.bz2 rails-125ecfbbff339c25ff81fdb48739e603b66ce406.zip |
Merge pull request #26821 from y-yagi/update_doc_about_change_column_default
update doc about `change_column_default` [ci skip]
-rw-r--r-- | activerecord/lib/active_record/migration.rb | 6 |
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 |