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

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -