phoenixframework/phoenix_ecto

Rollback: no function clause matching in Ecto.Adapters.Postgres.Connection.intersperse_map

Closed this issue · 2 comments

A relatively straightforward migration failed while rolling back. Appears to be while attempting to drop the "company_id" column.

def change do
   alter table(:connections) do
     add :company_id, references(:companies)
     remove :pos_id
   end

   create index(:connections, [:company_id])
end

Error message:

17:10:28.022 [info]  drop index connections_company_id_index

17:10:28.023 [info]  alter table connections
** (FunctionClauseError) no function clause matching in Ecto.Adapters.Postgres.Connection.intersperse_map/4
    (ecto) lib/ecto/adapters/postgres/connection.ex:901: Ecto.Adapters.Postgres.Connection.intersperse_map(nil, ", ", #Function<1.80844679/1 in Ecto.Adapters.Postgres.Connection.column_changes/2>, [[], ["DROP COLUMN ", [34, "company_id", 34]], ", "])

Versions:
Ecto: 2.1.3, Phoenix_Ecto: 3.0.1

Sorry, I should have opened this in ecto :|

No worries, fixed in Ecto master and in the v2.1 branch as well