smon/sql/00016.sql

10 lines
405 B
MySQL
Raw Permalink Normal View History

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;