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

RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
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
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
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
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
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

Other popular topics Top

Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 130286 1222
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
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
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 54006 488
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New

We're in Beta

About us Mission Statement