我在Rails应用程序中有一个表,其(在schema.rb中)看起来如下:
create_table "users", :force => true do |t|
t.string "name", :null=>false
t.string "address", :null=>false
end
我想编写一份Rails迁移文件,允许地址字段为空。也就是说,在此次迁移后,表格将如下所示:
create_table "users", :force => true do |t|
t.string "name", :null=>false
t.string "address"
end
我需要做什么才能解除约束?
raise NotImplementedError, "change_column_null is not implemented"
。 - drusepth