The change might look a bit tricky (in the way it does the single-quoting), I could change that if you want. With this fix we can run ecto.migrate correctly:
17:06:56.187 [info] == Running Shocolle.Repo.Migrations.AddCollesTable.up/0 forward
17:06:56.189 [info] execute "CREATE TYPE joutai AS ENUM ('wish', 'doing', 'done', 'pending', 'ditched')"
17:06:56.192 [info] create table colles
17:06:56.204 [info] == Migrated in 0.0s
There's no test for create_type and drop_type, which I could also try to add if you want.
String values should be single-quoted ref: https://www.postgresql.org/docs/current/static/datatype-enum.html
Before the change the SQL query generated for Postgres is incorrect and breaks
ecto.migrate
The change might look a bit tricky (in the way it does the single-quoting), I could change that if you want. With this fix we can run
ecto.migrate
correctly:There's no test for
create_type
anddrop_type
, which I could also try to add if you want.