alter type postgresql code example
Example 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';
Example 2: postgresql change column type
ALTER TABLE assets ALTER COLUMN name TYPE VARCHAR;
Example 3: update column data type postgres
ALTER TABLE table_name
ALTER COLUMN column_name [SET DATA] TYPE new_data_type;