You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we create enums in the database, we currently order the labels alphabetically. Since enum label ordering can be significant (one can sort by them, compare two enums...), it may be useful to preserve the .NET enum label value ordering when creating the PG enum.
Note that while PG allows inserting a new label after/before an existing label, it doesn't support reordering existing enum labels (or removing them). That means that if the .NET enum definition changes, we'll only be able to apply those changes when adding a new label.
Note also that this will cause a new migration to be created, as this will change the model.
The text was updated successfully, but these errors were encountered:
roji
changed the title
Consider ordering enum labels based on the .NET label ordering instead of alphabetically
Consider ordering enum labels based on the .NET label value instead of alphabetically
Dec 5, 2024
When we create enums in the database, we currently order the labels alphabetically. Since enum label ordering can be significant (one can sort by them, compare two enums...), it may be useful to preserve the .NET enum label value ordering when creating the PG enum.
Note that while PG allows inserting a new label after/before an existing label, it doesn't support reordering existing enum labels (or removing them). That means that if the .NET enum definition changes, we'll only be able to apply those changes when adding a new label.
Note also that this will cause a new migration to be created, as this will change the model.
The text was updated successfully, but these errors were encountered: