amizrash.bsky.social
@amizrash.bsky.social
Reason: Generally speaking, it fulfills its promise: Improved maintainability through loose coupling at the seams where it matters a lot.

Association: No need to fuss over it. Simply keep the high level *guideline* in mind and strive for coherent, loosely coupled packages.
September 15, 2025 at 3:45 AM
You can do better. Configure “on delete set null” and get both in a single shot.

That’s not the point though. The point is, if you used an actual Postgres *enum* instead, you’d forever be stuck with all of its elements. Can’t remove any element, period.

In practice, it’s an annoying limitation.
period.in
August 15, 2025 at 7:37 PM
Status enum: OPEN, CLOSED, REJECTED.

Once introduced, you can’t remove REJECTED (or any other element). But if you had a Status *table* with a single column and 3 rows and created FKs to it, you could potentially delete any status as long as you accepted the value getting nulled out if it’s in use.
August 15, 2025 at 7:28 PM
And I’ve done that more than a few times.

You don’t migrate your data when you drop a row that is referenced via foreign keys, do you? Either the FKs get nulled out or the DB prevents it.

I’m just saying that if Posgtres offered something similar for its enums, they would be much more attractive.
August 15, 2025 at 7:11 PM
One example is when the enum represents a “state” in a finite state machine. As you develop and evolve your model / code / understanding of what works best, some states go away or get broken down into multiple new ones.

I can think of a handful of other examples too.
August 15, 2025 at 1:36 PM
The biggest issue with Postgres enum types is that you can never remove an element once it goes it.

We use them a lot, but that issue alone makes us hesitate to use them every time, and rightly so.
August 15, 2025 at 11:59 AM
So you’re seeing hot takes that are silly?

Um… what else is new?
January 11, 2025 at 5:56 AM
Oh, upset that a social media app decided to stop censoring people in favor of your beliefs?

You know, being mentally ill is still better than being a fucking totalitarian.
January 11, 2025 at 5:48 AM