我有一个架构:
schema "editables" do
field :title, :string
field :content, :string
timestamps
end
现在我想将一个字段表单的类型更改:integer
为:binary
. 什么是编写迁移的正确方法,因为使用add
不起作用......?
def change do
alter table(:editables) do
add :title, :binary
add :content, :binary
timestamps
end
end