Skip to content

Commit f23e837

Browse files
committed
WIP
1 parent 4cacf4d commit f23e837

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

coderd/database/queries/notifications.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,17 +180,17 @@ ORDER BY name ASC;
180180
SELECT
181181
*
182182
FROM
183-
report_generator_logs
183+
notification_report_generator_logs
184184
WHERE
185185
user_id = $1
186186
AND notification_template_id = $2;
187187

188188
-- name: UpsertNotificationReportGeneratorLog :exec
189189
-- Insert or update notification report generator logs with recent activity.
190-
INSERT INTO report_generator_logs (user_id, notification_template_id, last_generated_at) VALUES (@user_id, @notification_template_id, @last_generated_at)
190+
INSERT INTO notification_report_generator_logs (user_id, notification_template_id, last_generated_at) VALUES (@user_id, @notification_template_id, @last_generated_at)
191191
ON CONFLICT (user_id, notification_template_id) DO UPDATE set last_generated_at = EXCLUDED.last_generated_at
192192
WHERE report_generator_logs.user_id = EXCLUDED.user_id AND report_generator_logs.notification_template_id = EXCLUDED.notification_template_id;
193193

194194
-- name: DeleteOldNotificationReportGeneratorLogs :exec
195195
-- Delete report generator logs that have been created at least a @before date.
196-
DELETE FROM report_generator_logs WHERE last_generated_at < @before::timestamptz AND notification_template_id = @notification_template_id;
196+
DELETE FROM notification_report_generator_logs WHERE last_generated_at < @before::timestamptz AND notification_template_id = @notification_template_id;

0 commit comments

Comments
 (0)