Skip to content

Instantly share code, notes, and snippets.

@atomkirk
Created February 9, 2021 14:22
Show Gist options
  • Save atomkirk/e8219ac62ee998418999593ebdbcc917 to your computer and use it in GitHub Desktop.
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