Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove incorrect comment that a default value of NULL cannot be set w…

…ith change_column_default.
  • Loading branch information...
commit 64fe0d4cba1cbe3bb6c78cad129aa9be43fdcc29 1 parent 61781d8
@manuelmeurer manuelmeurer authored
View
5 activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
@@ -279,12 +279,11 @@ def change_column(table_name, column_name, type, options = {})
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
Please sign in to comment.
Something went wrong with that request. Please try again.