From 99464bae8f6c8fc35cb9d693123d169cdb380889 Mon Sep 17 00:00:00 2001 From: APiankouski <109206864+APiankouski@users.noreply.github.com> Date: Mon, 1 Apr 2024 10:34:06 +0300 Subject: [PATCH] EPMRPP-89659 || Update Notification tab (#294) --- migrations/86_notication_update.down.sql | 10 ++++++++++ migrations/86_notication_update.up.sql | 10 ++++++++++ 2 files changed, 20 insertions(+) create mode 100644 migrations/86_notication_update.down.sql create mode 100644 migrations/86_notication_update.up.sql diff --git a/migrations/86_notication_update.down.sql b/migrations/86_notication_update.down.sql new file mode 100644 index 0000000..24499b5 --- /dev/null +++ b/migrations/86_notication_update.down.sql @@ -0,0 +1,10 @@ +DROP INDEX IF EXISTS unique_rule_name_per_project_rule_type; + +CREATE UNIQUE INDEX unique_rule_name_per_project + ON sender_case (rule_name, project_id); + +ALTER TABLE sender_case + DROP COLUMN IF EXISTS rule_details; + +ALTER TABLE sender_case + DROP COLUMN IF EXISTS rule_type; \ No newline at end of file diff --git a/migrations/86_notication_update.up.sql b/migrations/86_notication_update.up.sql new file mode 100644 index 0000000..76e0237 --- /dev/null +++ b/migrations/86_notication_update.up.sql @@ -0,0 +1,10 @@ +ALTER TABLE sender_case + ADD rule_type VARCHAR(55) NOT NULL DEFAULT 'email'; + +ALTER TABLE sender_case + ADD rule_details JSONB NULL; + +DROP INDEX unique_rule_name_per_project; + +CREATE UNIQUE INDEX unique_rule_name_per_project_rule_type + ON sender_case (rule_name, project_id, rule_type); \ No newline at end of file