Skip to content

Commit b3cf4ca

Browse files
committed
Adding of the new route to the migration file
1 parent 950f030 commit b3cf4ca

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

migrations/2025_07_01_warnings.sql

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,15 @@ CREATE TRIGGER warnings_moddatetime
1010
BEFORE UPDATE ON warnings
1111
FOR EACH ROW
1212
EXECUTE PROCEDURE moddatetime (updated_at);
13+
14+
UPDATE users
15+
SET capabilities = jsonb_set(
16+
capabilities,
17+
'{api,routes}',
18+
(
19+
COALESCE(capabilities->'api'->'routes', '[]'::jsonb) ||
20+
'["/v1/warnings/{run_id}"]'::jsonb
21+
),
22+
true
23+
)
24+
WHERE id != 0

0 commit comments

Comments
 (0)