You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defmoduleMyRepo.Migrations.CreateUserTypedouseEcto.Migrationdefupdoexecute"CREATE TYPE user_status AS ENUM ('customer','admin')"altertable(:users)doadd:status,:user_statusendenddefdowndoexecute"DROP TYPE user_status"altertable(:users)doremove:statusendendend
This is a postgres specific error due to the types cache. It also requires changes to the adapter API. At least the adapter API changes need to happen on 2.0.
When you create migration with TYPE ENUM and try use ( in next migration), error is is triggered, because Postgres not find new TYPE ENUM.
If you call migration task again, error is NOT triggered, because Postgres load ENUM new .
Versions:
OS: Darwin 15.0.0
Postgre: 9.4.5
Elixir: 1.1.1
Erlang/OTP: 18
Ecto: 1.0.6
Postgrex 0.9.1
Sample
First
Second
Error
I think can having help for create type, or method for reload types enum, or after execute migrate reload types enum
The text was updated successfully, but these errors were encountered: