postgresql add enum value 1

postgresql add enum value

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';

Here is what the above code is Doing:
1. Create a new enum type called enum_type.
2. Add a new value to the enum type.
3. Add a new value to the enum type before an existing value.
4. Add a new value to the enum type after an existing value.

Similar Posts