-- 1. rename the enum type you want to change alter type ExportType rename to _export_type; -- 2. create new type create type ExportType as enum ('CIRCULATION_LOG', 'BURSAR_FEES_FINES', 'BATCH_VOUCHER_EXPORT'); -- 3. rename column(s) which uses our enum type alter table diku_mod_data_export_spring.job rename column type to _type; -- 4. add new column of new type alter table diku_mod_data_export_spring.job add type ExportType not null default 'CIRCULATION_LOG'; -- 5. copy values to the new column update diku_mod_data_export_spring.job set type = _type::text::ExportType where 1 = 1; -- 6. cast exportType to varying CREATE CAST (character varying as ExportType) WITH INOUT AS IMPLICIT; -- 7. remove old column and type alter table diku_mod_data_export_spring.job drop column _type; drop type _export_type;