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 -

ios - Apple Push Notifications + TestFlight + Enterprise wildcard provisioning profile -

android - Drag and drop in ScrollView -