Skip to content

Instantly share code, notes, and snippets.

@atomkirk
Created February 9, 2021 14:22
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save atomkirk/e8219ac62ee998418999593ebdbcc917 to your computer and use it in GitHub Desktop.
Add postgres enum values in order (for sort)
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