diff options
author | Xavier Noria <fxn@hashref.com> | 2013-03-11 22:15:08 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2013-03-11 22:15:08 +0100 |
commit | efb534e1bb181d0409799d9c9e38c226235ba8e6 (patch) | |
tree | 5cd92da55f508f6c540d416055a5547fce2e235a /activerecord/lib | |
parent | 67b486142bd3ec42d4b1bffd5705aabd6a0cb4e0 (diff) | |
download | rails-efb534e1bb181d0409799d9c9e38c226235ba8e6.tar.gz rails-efb534e1bb181d0409799d9c9e38c226235ba8e6.tar.bz2 rails-efb534e1bb181d0409799d9c9e38c226235ba8e6.zip |
documents how to DROP DEFAULT [ci skip]
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb index e2deb6bfcd..7b8606ccc9 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb @@ -359,11 +359,15 @@ module ActiveRecord raise NotImplementedError, "change_column is not implemented" end - # Sets a new default value for a column. + # Sets a new default value for a column: + # + # change_column_default(:suppliers, :qualification, 'new') + # change_column_default(:accounts, :authorized, 1) + # + # Setting the default to +nil+ effectively drops the default: # - # change_column_default(:suppliers, :qualification, 'new') - # change_column_default(:accounts, :authorized, 1) # change_column_default(:users, :email, nil) + # def change_column_default(table_name, column_name, default) raise NotImplementedError, "change_column_default is not implemented" end |