【发布时间】:2015-09-15 10:23:37
【问题描述】:
我有一个架构:
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
【问题讨论】:
标签: elixir phoenix-framework ecto