ACM@UIUC TIL logo ACM@UIUC TIL

You have a column on one of your database tables with a default value. You’d like to remove the default value. Removing the default is the same as setting it to nil. You can do this with the ActiveRecord DSL using the change_column_default method.

def change
  change_column_default :users, :age, nil
end

See the docs for more details.