feat: notifications: report failed workspace builds (#14571)

This commit is contained in:
Marcin Tojek
2024-09-18 09:11:44 +02:00
committed by GitHub
parent 1e5438eadb
commit 6de59371ea
29 changed files with 1545 additions and 55 deletions
+10
View File
@@ -751,6 +751,13 @@ CREATE TABLE notification_preferences (
updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL
);
CREATE TABLE notification_report_generator_logs (
notification_template_id uuid NOT NULL,
last_generated_at timestamp with time zone NOT NULL
);
COMMENT ON TABLE notification_report_generator_logs IS 'Log of generated reports for users.';
CREATE TABLE notification_templates (
id uuid NOT NULL,
name text NOT NULL,
@@ -1726,6 +1733,9 @@ ALTER TABLE ONLY notification_messages
ALTER TABLE ONLY notification_preferences
ADD CONSTRAINT notification_preferences_pkey PRIMARY KEY (user_id, notification_template_id);
ALTER TABLE ONLY notification_report_generator_logs
ADD CONSTRAINT notification_report_generator_logs_pkey PRIMARY KEY (notification_template_id);
ALTER TABLE ONLY notification_templates
ADD CONSTRAINT notification_templates_name_key UNIQUE (name);