Clean up notification type enum and add SCRIPT
This commit is contained in:
parent
b83adad7c8
commit
4a52c319c4
1 changed files with 9 additions and 0 deletions
9
sql/00016.sql
Normal file
9
sql/00016.sql
Normal file
|
@ -0,0 +1,9 @@
|
|||
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;
|
Loading…
Add table
Reference in a new issue