START TRANSACTION;

ALTER TYPE goal_importance
    RENAME TO _goal_importance;

CREATE TYPE goal_importance AS ENUM('NOT_KEY', 'DEPARTMENT', 'COMPANY', 'PRIVATE', 'OKR', 'UNKNOWN');

ALTER TABLE goal
    ALTER COLUMN importance TYPE goal_importance USING importance :: text :: goal_importance;

DROP TYPE _goal_importance;

COMMIT;