sezaru

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

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.

Where Next?

Popular in Questions Top

Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New

Other popular topics Top

nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New

We're in Beta

About us Mission Statement