smon/sql/00016.sql
2024-06-02 10:10:14 +02:00

10 lines
405 B
SQL

ALTER TYPE notification_type RENAME TO _notification_type;
CREATE TYPE notification_type AS ENUM ('NTFY', 'SCRIPT');
ALTER TABLE notification RENAME COLUMN service TO _service;
ALTER TABLE notification ADD service notification_type NOT NULL DEFAULT 'NTFY';
UPDATE notification SET service = _service::text::notification_type;
ALTER TABLE notification DROP COLUMN _service;
DROP TYPE _notification_type;