aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2013-03-11 22:15:08 +0100
committerXavier Noria <fxn@hashref.com>2013-03-11 22:15:08 +0100
commitefb534e1bb181d0409799d9c9e38c226235ba8e6 (patch)
tree5cd92da55f508f6c540d416055a5547fce2e235a /activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
parent67b486142bd3ec42d4b1bffd5705aabd6a0cb4e0 (diff)
downloadrails-efb534e1bb181d0409799d9c9e38c226235ba8e6.tar.gz
rails-efb534e1bb181d0409799d9c9e38c226235ba8e6.tar.bz2
rails-efb534e1bb181d0409799d9c9e38c226235ba8e6.zip
documents how to DROP DEFAULT [ci skip]
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb10
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