gjaldon / ecto_enum

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

Support string-backed enums #50

Closed cesariouy closed 5 years ago

cesariouy commented 7 years ago

These changes are useful for when a project is in the process of migrating to Postgres enums.

Huge shout-out to @mtwilliams for authoring issue #4 and PR #9! This borrows heavily from his work.

cesariouy commented 7 years ago

@gjaldon The failing build for Elixir 1.3.0 has to do with a Postgrex dependency issue (requires ~> 1.3.4 or ~> 1.4), which seems to be affecting other builds as well.

cesariouy commented 7 years ago

@gjaldon The tests are now passing, could you take a look at this?

gjaldon commented 6 years ago

@cesariouy I agree with the idea of string-backed enums for use in migrating. Will need to take more time to review though.

archseer commented 6 years ago

Sorry for the bump, but we'd find this feature useful for migrating from a legacy schema (string based field with preset values) as well.

Freyskeyd commented 6 years ago

thank's @gjaldon and @cesariouy for the work.

We also need these kind of changes to support string based Enum (for mysql). Any idea of a release date?

williamweckl commented 6 years ago

Will this PR get merged?

erikreedstrom commented 6 years ago

@gjaldon What else do you require for us to get this merged in?

mtwilliams commented 6 years ago

FYI https://github.com/tsutsu/ecto_homoiconic_enum

gjaldon commented 5 years ago

This is stale since we already support string-backed enums after the rewrite