Skip to content

Commit f472f43

Browse files
committed
Retroactively fix migration
1 parent 5222886 commit f472f43

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sql/2025-06-04_watch-projects.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ INSERT INTO notification_subscriptions (subscriber_user_id, scope_user_id, topic
55
p.owner_user_id,
66
'{}',
77
ARRAY['watch_project'::notification_topic_group]::notification_topic_group[],
8-
jsonb_build_object('projectId', p.id)
8+
jsonb_build_object('projectId', 'P-' || p.id)
99
FROM users u
1010
JOIN projects p ON u.id = p.owner_user_id
1111
WHERE NOT EXISTS (
@@ -14,6 +14,6 @@ INSERT INTO notification_subscriptions (subscriber_user_id, scope_user_id, topic
1414
AND ns.scope_user_id = p.owner_user_id
1515
AND ns.topics = '{}'
1616
AND ns.topic_groups = ARRAY['watch_project'::notification_topic_group]
17-
AND ns.filter = jsonb_build_object('projectId', p.id)
17+
AND ns.filter = jsonb_build_object('projectId', 'P-' || p.id)
1818
)
1919
;

0 commit comments

Comments
 (0)