gjaldon / ecto_enum

Ecto extension to support enums in models
MIT License
563 stars 131 forks source link

values need to be quoted #19

Closed onelesd closed 8 years ago

onelesd commented 8 years ago

This addresses a bug with the feature added in #14.

Postgres requires values be single-quoted. Fixes migration error:

19:49:22.355 [info]  execute "CREATE TYPE my_type AS ENUM (val1, val2, val3)"
** (Postgrex.Error) ERROR (syntax_error): syntax error at or near "val1"
gjaldon commented 8 years ago

Thanks for the PR @onelesd! PR https://github.com/gjaldon/ecto_enum/pull/18 fixes the same bug so will close this in favor of #18. Thanks again! 👍