I have a table column that uses an enum
type. I wish to update that enum
type to have an additional possible value. I don't want to delete any existing values, just add the new value. What is the simplest way to do this?
I have a table column that uses an enum
type. I wish to update that enum
type to have an additional possible value. I don't want to delete any existing values, just add the new value. What is the simplest way to do this?
PostgreSQL 9.1 introduces ability to ALTER Enum types:
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';