activerecord - Remove a type modifier from schema with a migration in Rails -
let's pretend schema looks this:
create_table "bunnies", force: true |t| t.datetime "created_at", null: false end
how write migration removes "null: false" constraint on schema?
this should it
change_column :bunnies, :created_at, :datetime, null: true
Comments
Post a Comment