Closed youroff closed 5 years ago
Ah, it seems like it wasn't supposed to work, this example (with change
) is a bit misleading: https://github.com/gjaldon/ecto_enum#using-postgress-enum-type
Temporarily fixed this by importing Ecto.Migration
in the same file where enums are defined, so that check in create_type
generation succeeded and execute/2
were used, but in might need a proper fix, which I'm not sure what should be. Leaving this open until reaction from the maintainers.
Thanks for reporting the bug @youroff! 💜
Here's what my migration looks like:
Here's the output on rollback:
Should creation of type and first use be separated in different migrations then?