Skip to content

Commit

Permalink
legacymigrate: ignore user_portal rows whose user isn't logged in
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Aug 8, 2024
1 parent eeffb0d commit fd4b736
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/mautrix-signal/legacymigrate.sql
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ SELECT
false, -- preferred
CASE WHEN last_read_ts = 0 THEN NULL ELSE last_read_ts * 1000000 END -- last_read
FROM user_portal_old
LEFT JOIN user_old ON user_old.mxid = user_portal_old.user_mxid;
LEFT JOIN user_old ON user_old.mxid = user_portal_old.user_mxid
WHERE user_old.uuid IS NOT NULL;

DROP TABLE disappearing_message_old;
DROP TABLE reaction_old;
Expand Down

0 comments on commit fd4b736

Please sign in to comment.