https://github.com/thiamsantos/ecto_enum_migration
Provides a DSL to easily handle Postgres Enum Types in Ecto database migrations.
https://github.com/thiamsantos/ecto_enum_migration
ecto elixir postgres
Last synced: about 1 month ago
JSON representation
Provides a DSL to easily handle Postgres Enum Types in Ecto database migrations.
- Host: GitHub
- URL: https://github.com/thiamsantos/ecto_enum_migration
- Owner: thiamsantos
- License: apache-2.0
- Created: 2020-05-09T23:31:55.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-09-23T13:43:46.000Z (over 1 year ago)
- Last Synced: 2025-06-02T01:51:21.646Z (8 months ago)
- Topics: ecto, elixir, postgres
- Language: Elixir
- Homepage: https://hex.pm/packages/ecto_enum_migration
- Size: 33.2 KB
- Stars: 17
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# EctoEnumMigration
[](https://github.com/Finbits/ecto_enum_migration/actions)
[][hex-url]
[][hex-url]
[][hex-url]
Provides a DSL to easily handle Postgres Enum Types in Ecto database migrations.
## Why
[`ecto_enum`](https://github.com/gjaldon/ecto_enum) provides some handy helpers to create and drop types during migration.
The problem with them is that the migrations endedup coupled with the current state
of the code of the enums.
So any change to a existing enum, or even a rename of the module that holds the
migration, has a high chance to break existing migrations. So in order to have a
highly reliable migration suite it need to be fully decoupled from the rest of
the application.
## Installation
The package can be installed by adding `ecto_enum_migration` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:ecto_enum_migration, "~> 0.4.0"}
]
end
```
The docs can be found at [https://hexdocs.pm/ecto_enum_migration](https://hexdocs.pm/ecto_enum_migration).
## License
[Apache License, Version 2.0](LICENSE) © [Finbits](https://github.com/Finbits)
[hex-url]: https://hex.pm/packages/ecto_enum_migration