I usually just use a string natural key into a table of valid values instead. It’s simple and avoids any gotchas with enum migrations. It also lets you add more data to the enum, like when it was added or a long name to go with its natural key short name.
I usually just use a string natural key into a table of valid values instead. It’s simple and avoids any gotchas with enum migrations. It also lets you add more data to the enum, like when it was added or a long name to go with its natural key short name.