Skip to content

Commit d8f51ce

Browse files
committed
Review comments
Signed-off-by: Danny Kopping <danny@coder.com>
1 parent 284b781 commit d8f51ce

File tree

6 files changed

+7
-25
lines changed

6 files changed

+7
-25
lines changed

coderd/database/dump.sql

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/database/migrations/000219_notifications.up.sql

+2-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ CREATE TABLE notification_templates
1616
(
1717
id uuid NOT NULL,
1818
name text NOT NULL,
19-
enabled boolean DEFAULT TRUE NOT NULL,
2019
title_template text NOT NULL,
2120
body_template text NOT NULL,
2221
actions jsonb,
@@ -51,8 +50,8 @@ CREATE TABLE notification_messages
5150
CREATE INDEX idx_notification_messages_status ON notification_messages (status);
5251

5352
-- TODO: autogenerate constants which reference the UUIDs
54-
INSERT INTO notification_templates (id, name, enabled, title_template, body_template, "group", actions)
55-
VALUES ('f517da0b-cdc9-410f-ab89-a86107c420ed', 'Workspace Deleted', true, E'Workspace "{{.Labels.name}}" deleted',
53+
INSERT INTO notification_templates (id, name, title_template, body_template, "group", actions)
54+
VALUES ('f517da0b-cdc9-410f-ab89-a86107c420ed', 'Workspace Deleted', E'Workspace "{{.Labels.name}}" deleted',
5655
E'Hi {{.UserName}}\n\nYour workspace **{{.Labels.name}}** was deleted.\nThe specified reason was "**{{.Labels.reason}}**".',
5756
'Workspace Events', '[
5857
{

coderd/database/migrations/testdata/fixtures/000219_notifications.up.sql

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
-- TODO: add more fixtures
2-
31
DO
42
$$
53
DECLARE

coderd/database/models.go

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/database/queries.sql.go

+3-11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/database/queries/notifications.sql

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
-- name: InsertNotificationTemplate :one
2-
INSERT INTO notification_templates (id, name, enabled, title_template, body_template, "group")
3-
VALUES ($1,
4-
$2,
5-
$3,
6-
$4,
7-
$5,
8-
$6)
2+
INSERT INTO notification_templates (id, name, title_template, body_template, "group")
3+
VALUES ($1, $2, $3, $4, $5)
94
RETURNING *;
105

116
-- name: FetchNewMessageMetadata :one

0 commit comments

Comments
 (0)