Created
February 9, 2021 14:22
-
-
Save atomkirk/e8219ac62ee998418999593ebdbcc917 to your computer and use it in GitHub Desktop.
Add postgres enum values in order (for sort)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ALTER TYPE enum_type ADD VALUE 'new_value'; -- appends to list | |
ALTER TYPE enum_type ADD VALUE 'new_value' BEFORE 'old_value'; | |
ALTER TYPE enum_type ADD VALUE 'new_value' AFTER 'old_value'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment