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

Popular posts from this blog

node.js - StackOverflow API not returning JSON -

python - Subclassed QStyledItemDelegate ignores Stylesheet -

php - Laravel 4.1 to Heroku: SQLSTATE[HY000] [2002] No such file or directory -