method
change_column_default
change_column_default(table_name, column_name, default)
public
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 apppropriate SQL statement yourself.
Examples
change_column_default(:suppliers, :qualification, 'new') change_column_default(:accounts, :authorized, 1)
Register or
log in
to add new notes.
mutru -
October 10, 2008
Vidmantas -
October 10, 2008 - (v2.1.0)
3 thanks
Implemented in database adapters
These methods are not implemented in the abstract classes. Instead, all database adapters implement these separately, if the feature is supported.
0 thanks
Not implented yet
According to this method’s source, change_column_default is not implemented as well as change_column

