sezaru
Postgres ENUM support for Ash.Type.Enum?
Is there support for using Postgres ENUM with Ash.Type.Enum?
I do know that you can do that if you create the migration yourself like it is done in this commit: chore: test enum types · ash-project/ash_postgres@a6577d5 · GitHub
But, the question is more if there is now support for it in the migration layer.
Basically, I would like to be able to create an Ash.TypeEnum and ash_postgres would handle the migration to create the type, add new values, remove old ones, etc.
Most Liked
Schultzer
No there is not something inherently wrong with it, although it does imposes constraints that can be completely avoided by having the logic live in the application, that way you can run two different version of your application without any downtime or performance degradation. As software is rarely set in stone.
Some of the constraints are complicating your migration and deployments due to table lock and consistency issues with application and database.
I’ve worked on codebases that leveraged Postgres Enums heavily, and it can be frustrating, especially when your application is the only writer to the database.
Popular in Questions
Other popular topics
Latest Ash Threads
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #hex
- #security










