diff --git a/scripts/sql/162_notification_template_for_approval.down.sql b/scripts/sql/162_notification_template_for_approval.down.sql index c8e65bc548..4ccdf3ed3d 100644 --- a/scripts/sql/162_notification_template_for_approval.down.sql +++ b/scripts/sql/162_notification_template_for_approval.down.sql @@ -1,5 +1,3 @@ -ALTER TABLE ONLY public.notifier_event_log DROP CONSTRAINT notifier_event_log_event_type_id_fkey; -ALTER TABLE ONLY public.notifier_event_log - ADD CONSTRAINT notifier_event_log_event_type_id_fkey FOREIGN KEY (event_type_id) REFERENCES public.event(id) ON DELETE CASCADE; delete from "public"."notification_templates" where event_type_id=4; +delete from notifier_event_log where event_type_id=4; delete from public.event where event_type='APPROVAL'; \ No newline at end of file diff --git a/scripts/sql/162_notification_template_for_approval.up.sql b/scripts/sql/162_notification_template_for_approval.up.sql index f2cba64f5d..63143e57b3 100644 --- a/scripts/sql/162_notification_template_for_approval.up.sql +++ b/scripts/sql/162_notification_template_for_approval.up.sql @@ -1,6 +1,3 @@ -ALTER TABLE ONLY public.notifier_event_log DROP CONSTRAINT notifier_event_log_event_type_id_fkey; -ALTER TABLE ONLY public.notifier_event_log - ADD CONSTRAINT notifier_event_log_event_type_id_fkey FOREIGN KEY (event_type_id) REFERENCES public.event(id) ; INSERT INTO public.event (id, event_type, description) VALUES (4, 'APPROVAL', ''); INSERT INTO "public"."notification_templates" (channel_type, node_type, event_type_id, template_name, template_payload) VALUES ('smtp', 'CD', 4, 'CD approval smtp template', '{"from": "{{fromEmail}}",