Skip to content

Commit

Permalink
legacymigrate: also ignore backfill_task rows for nonexistent logins
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Aug 19, 2024
1 parent 0d207af commit b563ba1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/mautrix-meta/legacymigrate.sql
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ SELECT
'', -- bridge_id
CAST(portal_id AS TEXT), -- portal_id
CASE WHEN portal_receiver<>0 THEN CAST(portal_receiver AS TEXT) ELSE '' END, -- portal_receiver
(SELECT id FROM user_login WHERE user_mxid=backfill_task_old.user_mxid), -- user_login_id
user_login.id, -- user_login_id
page_count, -- batch_count
finished, -- is_done
'', -- cursor
Expand All @@ -148,6 +148,7 @@ SELECT
completed_at * 1000000, -- completed_at
cooldown_until * 1000000 -- next_dispatch_min_ts
FROM backfill_task_old
INNER JOIN user_login ON user_login.user_mxid=backfill_task_old.user_mxid
WHERE true
ON CONFLICT DO NOTHING;

Expand Down

0 comments on commit b563ba1

Please sign in to comment.