|
1 | 1 | UPDATE notification_templates
|
2 | 2 | SET
|
3 |
| - body_template = REPLACE(body_template::text, 'Hi {{.UserName}}', 'Hi {{.UserName}},')::text |
| 3 | + body_template = E'Hi {{.UserName}},\n\n' || |
| 4 | + E'User account **{{.Labels.suspended_account_name}}** has been suspended.\n\n' || |
| 5 | + E'The newly suspended account belongs to **{{.Labels.suspended_account_user_name}}** and was suspended by **{{.Labels.account_suspender_user_name}}**.' |
4 | 6 | WHERE
|
5 |
| - id = '29a09665-2a4c-403f-9648-54301670e7be'; |
| 7 | + id = 'b02ddd82-4733-4d02-a2d7-c36f3598997d'; |
6 | 8 |
|
7 | 9 | UPDATE notification_templates
|
8 | 10 | SET
|
9 |
| -body_template = E'Hi {{.UserName}},\n\n' |
10 |
| - 'User account **{{.Labels.activated_account_name}}** has been activated. ' |
11 |
| - 'The newly activated account belongs to **{{.Labels.activated_account_user_name}}** and was activated by **{{.Labels.account_activator_user_name}}**.' |
| 11 | + body_template = E'Hi {{.UserName}},\n\n' || |
| 12 | + E'Your account **{{.Labels.suspended_account_name}}** has been suspended by **{{.Labels.account_suspender_user_name}}**' |
12 | 13 | WHERE
|
13 |
| - id = '9f5af851-8408-4e73-a7a1-c6502ba46689'; |
| 14 | + id = '6a2f0609-9b69-4d36-a989-9f5925b6cbff'; |
14 | 15 |
|
15 | 16 | UPDATE notification_templates
|
16 | 17 | SET
|
17 |
| - body_template = REPLACE(body_template::text, 'Hi {{.UserName}},', E'Hi {{.UserName}},\n')::text |
| 18 | + body_template = E'Hi {{.UserName}},\n\n' || |
| 19 | + E'User account **{{.Labels.activated_account_name}}** has been activated.\n\n' || |
| 20 | + E'The newly activated account belongs to **{{.Labels.activated_account_user_name}}** and was activated by **{{.Labels.account_activator_user_name}}**.' |
18 | 21 | WHERE
|
19 |
| - id = 'b02ddd82-4733-4d02-a2d7-c36f3598997d'; |
| 22 | + id = '9f5af851-8408-4e73-a7a1-c6502ba46689'; |
20 | 23 |
|
21 | 24 | UPDATE notification_templates
|
22 | 25 | SET
|
23 |
| - body_template = REPLACE(body_template::text, 'Hi {{.UserName}}', E'Hi {{.UserName}},\n')::text |
| 26 | + body_template = E'Hi {{.UserName}},\n\n' || |
| 27 | + E'Your account **{{.Labels.activated_account_name}}** has been activated by **{{.Labels.account_activator_user_name}}**.' |
24 | 28 | WHERE
|
25 |
| - id = 'c34a0c09-0704-4cac-bd1c-0c0146811c2b'; |
| 29 | + id = '1a6a6bea-ee0a-43e2-9e7c-eabdb53730e4'; |
26 | 30 |
|
27 | 31 | UPDATE notification_templates
|
28 | 32 | SET
|
29 |
| - body_template = REPLACE(body_template::text, E'({{.Labels.template_version_name}}).\n', E'({{.Labels.template_version_name}}).\n\n')::text |
| 33 | + body_template = E'Hi {{.UserName}},\n\n' || |
| 34 | + E'New user account **{{.Labels.created_account_name}}** has been created.\n\n' || |
| 35 | + E'This new user account was created for **{{.Labels.created_account_user_name}}** by **{{.Labels.account_creator}}**' |
30 | 36 | WHERE
|
31 |
| - id = 'c34a0c09-0704-4cac-bd1c-0c0146811c2b'; |
| 37 | + id = '4e19c0ac-94e1-4532-9515-d1801aa283b2'; |
32 | 38 |
|
33 | 39 | UPDATE notification_templates
|
34 | 40 | SET
|
35 |
| - body_template = REPLACE(body_template::text, 'Hi {{.UserName}}', E'Hi {{.UserName}},\n')::text |
| 41 | + body_template = E'Hi {{.UserName}},\n\n' || |
| 42 | + E'User account **{{.Labels.deleted_account_name}}** has been deleted.\n\n' || |
| 43 | + E'The deleted account belonged to **{{.Labels.deleted_account_user_name}}** and was deleted by **{{.Labels.account_deleter_user_name}}**.' |
36 | 44 | WHERE
|
37 |
| - id = '381df2a9-c0c0-4749-420f-80a9280c66f9'; |
| 45 | + id = 'f44d9314-ad03-4bc8-95d0-5cad491da6b6'; |
38 | 46 |
|
39 | 47 | UPDATE notification_templates
|
40 | 48 | SET
|
41 |
| - body_template = REPLACE(body_template::text, 'The specified reason', E'\nThe specified reason')::text |
| 49 | + body_template = E'Hi {{.UserName}}\n\n' || |
| 50 | + E'The template **{{.Labels.name}}** was deleted by **{{ .Labels.initiator }}**.\n\n' || |
| 51 | + E'The templates display name was **{{.Labels.display_name}}**.' |
42 | 52 | WHERE
|
43 |
| - id = '381df2a9-c0c0-4749-420f-80a9280c66f9'; |
| 53 | + id = '29a09665-2a4c-403f-9648-54301670e7be'; |
| 54 | + |
| 55 | +UPDATE notification_templates |
| 56 | +SET body_template = E'Hi {{.UserName}}\n\n' || |
| 57 | + E'Your workspace **{{.Labels.name}}** has been updated automatically to the latest template version ({{.Labels.template_version_name}}).\n\n' || |
| 58 | + E'Reason for update: **{{.Labels.template_version_message}}**' |
| 59 | +WHERE |
| 60 | + id = 'c34a0c09-0704-4cac-bd1c-0c0146811c2b'; |
44 | 61 |
|
45 | 62 | UPDATE notification_templates
|
46 | 63 | SET
|
47 |
| - body_template = REPLACE(body_template::text, 'Hi {{.UserName}}', 'Hi {{.UserName}},')::text |
| 64 | + body_template = E'Hi {{.UserName}}\n\n' || |
| 65 | + E'Automatic build of your workspace **{{.Labels.name}}** failed.\n\n' || |
| 66 | + E'The specified reason was "**{{.Labels.reason}}**".' |
48 | 67 | WHERE
|
49 |
| - id = 'f517da0b-cdc9-410f-ab89-a86107c420ed'; |
| 68 | + id = '381df2a9-c0c0-4749-420f-80a9280c66f9'; |
50 | 69 |
|
51 | 70 | UPDATE notification_templates
|
52 | 71 | SET
|
53 |
| - body_template = REPLACE(body_template::text, 'The specified reason', E'\nThe specified reason')::text |
| 72 | + body_template = E'Hi {{.UserName}},\n\n' || |
| 73 | + E'Your workspace **{{.Labels.name}}** was deleted.\n\n' || |
| 74 | + E'The specified reason was "**{{.Labels.reason}}{{ if .Labels.initiator }} ({{ .Labels.initiator }}){{end}}**".' |
54 | 75 | WHERE
|
55 | 76 | id = 'f517da0b-cdc9-410f-ab89-a86107c420ed';
|
56 | 77 |
|
57 | 78 | UPDATE notification_templates
|
58 | 79 | SET
|
59 |
| - body_template = REPLACE(body_template::text, 'Hi {{.UserName}}', 'Hi {{.UserName}},')::text |
| 80 | + body_template = E'Hi {{.UserName}}\n\n,' || -- add comma |
| 81 | + E'Your workspace **{{.Labels.name}}** has been marked as [**dormant**](https://coder.com/docs/templates/schedule#dormancy-threshold-enterprise) because of {{.Labels.reason}}.\n' || |
| 82 | + E'Dormant workspaces are [automatically deleted](https://coder.com/docs/templates/schedule#dormancy-auto-deletion-enterprise) after {{.Labels.timeTilDormant}} of inactivity.\n' || |
| 83 | + E'To prevent deletion, use your workspace with the link below.' |
60 | 84 | WHERE
|
61 | 85 | id = '0ea69165-ec14-4314-91f1-69566ac3c5a0';
|
62 | 86 |
|
63 | 87 | UPDATE notification_templates
|
64 | 88 | SET
|
65 |
| - body_template = REPLACE(body_template::text, 'Hi {{.UserName}}', 'Hi {{.UserName}},')::text |
| 89 | + body_template = E'Hi {{.UserName}}\n\n,' || -- add comma |
| 90 | + E'Your workspace **{{.Labels.name}}** has been marked for **deletion** after {{.Labels.timeTilDormant}} of [dormancy](https://coder.com/docs/templates/schedule#dormancy-auto-deletion-enterprise) because of {{.Labels.reason}}.\n' || |
| 91 | + E'To prevent deletion, use your workspace with the link below.' |
66 | 92 | WHERE
|
67 | 93 | id = '51ce2fdf-c9ca-4be1-8d70-628674f9bc42';
|
68 | 94 |
|
69 | 95 | UPDATE notification_templates
|
70 | 96 | SET
|
71 |
| - body_template = REPLACE(body_template::text, 'The workspace build was initiated by', E'\nThe workspace build was initiated by')::text |
| 97 | + body_template = E'Hi {{.UserName}},\n\n' || |
| 98 | + E'A manual build of the workspace **{{.Labels.name}}** using the template **{{.Labels.template_name}}** failed (version: **{{.Labels.template_version_name}}**).\n\n' || |
| 99 | + E'The workspace build was initiated by **{{.Labels.initiator}}**.' |
72 | 100 | WHERE
|
73 | 101 | id = '2faeee0f-26cb-4e96-821c-85ccb9f71513';
|
74 |
| - |
75 |
| -UPDATE notification_templates |
76 |
| -SET |
77 |
| - body_template = REPLACE(body_template::text, 'Hi {{.UserName}},', E'Hi {{.UserName}},\n')::text |
78 |
| -WHERE |
79 |
| - id = '1a6a6bea-ee0a-43e2-9e7c-eabdb53730e4'; |
80 |
| - |
81 |
| -UPDATE notification_templates |
82 |
| -SET |
83 |
| - body_template = REPLACE(body_template::text, 'Hi {{.UserName}},', E'Hi {{.UserName}},\n')::text |
84 |
| -WHERE |
85 |
| - id = '6a2f0609-9b69-4d36-a989-9f5925b6cbff'; |
|
0 commit comments