i have migrtion:
def change
create_table :m_roles do |t|
t.string :name, null: false, index: { unique: true }, default: ""
t.timestamps
end
end
schema:
create_table "m_roles", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
t.string "name", default: "", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["name"], name: "index_m_groups_on_name", unique: true
end
I would like to change it to the following:
null: false -> null: true
and remove default: ""
But I don't know what to write about the new migration: i try but it not rollback: