Association: No need to fuss over it. Simply keep the high level *guideline* in mind and strive for coherent, loosely coupled packages.
Association: No need to fuss over it. Simply keep the high level *guideline* in mind and strive for coherent, loosely coupled packages.
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.
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.
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.
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.
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.
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.
I can think of a handful of other examples too.
I can think of a handful of other examples too.
We use them a lot, but that issue alone makes us hesitate to use them every time, and rightly so.
We use them a lot, but that issue alone makes us hesitate to use them every time, and rightly so.
Um… what else is new?
Um… what else is new?
You know, being mentally ill is still better than being a fucking totalitarian.
You know, being mentally ill is still better than being a fucking totalitarian.