Elixir Exto,未能将类型更改为jsonb

Elixir Exto,未能将类型更改为jsonb,elixir,phoenix-framework,ecto,Elixir,Phoenix Framework,Ecto,将列类型修改为jsonb或map时出错。这是我的迁移文件: def change do alter table(:disbursements) do modify :reason, :map end end 我收到如下错误: ** (Postgrex.Error) ERROR 42804 (datatype_mismatch) column "reason" cannot be cast automatically to type jsonb hint:

将列类型修改为jsonb或map时出错。这是我的迁移文件:

  def change do
    alter table(:disbursements) do
      modify :reason, :map
    end
  end
我收到如下错误:

** (Postgrex.Error) ERROR 42804 (datatype_mismatch) column "reason" cannot be cast automatically to type jsonb

hint: You might need to specify "USING reason::jsonb".
(ecto_sql) lib/ecto/adapters/sql.ex:624: Ecto.Adapters.SQL.raise_sql_call_error/1

我的问题是如何使用reason::jsonb将额外的命令添加到迁移文件中?

改为运行原始SQL。是的,我可以,但我的代码是否由我的团队运行呢?我应该一个接一个地告诉你运行原始sql吗?哦,明白了,你是说像这样运行吗?是的,像这个。