diff --git a/scripts/sql/197_notification_template_for_config_approval.down.sql b/scripts/sql/197_notification_template_for_config_approval.down.sql new file mode 100644 index 00000000000..07e66194188 --- /dev/null +++ b/scripts/sql/197_notification_template_for_config_approval.down.sql @@ -0,0 +1,3 @@ +delete from "public"."notification_templates" where event_type_id=5; +delete from notifier_event_log where event_type_id=5; +delete from public.event where event_type='CONFIG APPROVAL'; \ No newline at end of file diff --git a/scripts/sql/197_notification_template_for_config_approval.up.sql b/scripts/sql/197_notification_template_for_config_approval.up.sql new file mode 100644 index 00000000000..c338d2e79a3 --- /dev/null +++ b/scripts/sql/197_notification_template_for_config_approval.up.sql @@ -0,0 +1,5 @@ +INSERT INTO public.event (id, event_type, description) VALUES (5, 'CONFIG APPROVAL', ''); +INSERT INTO "public"."notification_templates" (channel_type, node_type, event_type_id, template_name, template_payload) +VALUES ('ses', 'CD', 5, 'Config approval ses template', '{"from": "{{fromEmail}}", "to": "{{toEmail}}","subject": "🛎️ Config Change approval requested | Application > {{appName}} | Change Impacts > {{envName}}","html": "
\"ci-triggered\"
Config Change approval request
{{eventTime}}
by{{triggeredBy}}
{{#protectConfigLink}}View request{{/protectConfigLink}}

Application
Change Impacts
{{appName}}
{{envName}}
File Details
File Type
File Name
{{protectConfigFileType}}
{{protectConfigFileName}}

Comment
{{#protectConfigComment}}{{.}}
{{/protectConfigComment}}
BlogWebsite
© Devtron Labs 2020
"}'); +INSERT INTO "public"."notification_templates" (channel_type, node_type, event_type_id, template_name, template_payload) +VALUES ('smtp', 'CD', 5, 'Config approval smtp template', '{"from": "{{fromEmail}}", "to": "{{toEmail}}","subject": "🛎️ Config Change approval requested | Application > {{appName}} | Change Impacts > {{envName}}","html": "
\"ci-triggered\"
Config Change approval request
{{eventTime}}
by{{triggeredBy}}
{{#protectConfigLink}}View request{{/protectConfigLink}}

Application
Change Impacts
{{appName}}
{{envName}}
File Details
File Type
File Name
{{protectConfigFileType}}
{{protectConfigFileName}}

Comment
{{#protectConfigComment}}{{.}}
{{/protectConfigComment}}
BlogWebsite
© Devtron Labs 2020
"}'); \ No newline at end of file