aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Meurer <manuel.meurer@gmail.com>2011-03-16 11:01:43 +0700
committerManuel Meurer <manuel.meurer@gmail.com>2011-03-16 11:01:43 +0700
commit64fe0d4cba1cbe3bb6c78cad129aa9be43fdcc29 (patch)
tree747c2ef54085972463c8d8225f3dc81b50f746a2
parent61781d84c11c8b5e37ad7cca5c40864759150a33 (diff)
downloadrails-64fe0d4cba1cbe3bb6c78cad129aa9be43fdcc29.tar.gz
rails-64fe0d4cba1cbe3bb6c78cad129aa9be43fdcc29.tar.bz2
rails-64fe0d4cba1cbe3bb6c78cad129aa9be43fdcc29.zip
Remove incorrect comment that a default value of NULL cannot be set with change_column_default.
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb5
1 files changed, 2 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 3ec7dd02a4..8bae50885f 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
@@ -279,12 +279,11 @@ module ActiveRecord
raise NotImplementedError, "change_column is not implemented"
end
- # Sets a new default value for a column. If you want to set the default
- # value to +NULL+, you are out of luck. You need to
- # DatabaseStatements#execute the appropriate SQL statement yourself.
+ # Sets a new default value for a column.
# ===== Examples
# 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