我有以下迁移,但不知道在其中使用什么down
method
change_table :addresses do |t|
t.references :addressable, :polymorphic => true
end
实际上,
change_table :addresses do |t|
t.remove_references :addressable
end
会有点铁轨,不是吗?
edit:正如埃本·吉尔指出的那样
change_table :addresses do |t|
t.remove_references :addressable, :polymorphic => true
end
是执行此操作的正确方法。干杯!
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)