|
2 | 2 |
|
3 | 3 | DO
|
4 | 4 | $$
|
5 |
| -DECLARE |
6 |
| -templatetext; |
7 |
| -BEGIN |
8 |
| -SELECT'You successfully did {{.thing}}!' INTO template; |
| 5 | +DECLARE |
| 6 | +templatetext; |
| 7 | +BEGIN |
| 8 | +SELECT'You successfully did {{.thing}}!' INTO template; |
9 | 9 |
|
10 |
| -INSERT INTO notification_templates (id, name, enabled, title_template, body_template,"group") |
11 |
| -VALUES ('a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11','A', TRUE, template, template,'Group 1'), |
12 |
| - ('b0eebc99-9c0b-4ef8-bb6d-6bb9bd380a12','B', TRUE, template, template,'Group 1'), |
13 |
| - ('c0eebc99-9c0b-4ef8-bb6d-6bb9bd380a13','C', TRUE, template, template,'Group 2'); |
| 10 | +INSERT INTO notification_templates (id, name, enabled, title_template, body_template,"group") |
| 11 | +VALUES ('a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11','A', TRUE, template, template,'Group 1'), |
| 12 | + ('b0eebc99-9c0b-4ef8-bb6d-6bb9bd380a12','B', TRUE, template, template,'Group 1'), |
| 13 | + ('c0eebc99-9c0b-4ef8-bb6d-6bb9bd380a13','C', TRUE, template, template,'Group 2'); |
14 | 14 |
|
15 |
| -END |
| 15 | +INSERT INTOpublic.users(id, email, username, hashed_password, created_at, updated_at, status, rbac_roles, deleted) |
| 16 | +VALUES ('fc1511ef-4fcf-4a3b-98a1-8df64160e35a','githubuser@coder.com','githubuser','\x','2022-11-02 13:05:21.445455+02','2022-11-02 13:05:21.445455+02','active','{}', false)ON CONFLICT DO NOTHING; |
| 17 | + |
| 18 | +INSERT INTO notification_messages (id, notification_template_id, user_id, method, created_by, payload) |
| 19 | +VALUES ( |
| 20 | + gen_random_uuid(),'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11','fc1511ef-4fcf-4a3b-98a1-8df64160e35a','smtp'::notification_method,'test','{}' |
| 21 | + ); |
| 22 | + END |
16 | 23 | $$;
|