Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Fix UndefinedColumn: column "key_json" does not exist errors when handling users with more than 50 non-E2E devices #14580

Merged
merged 1 commit into from
Nov 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions synapse/storage/databases/main/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -1559,6 +1559,7 @@ async def check_too_many_devices_for_user(self, user_id: str) -> Collection[str]
# that ensures we keep at most 50 devices.
sql = """
SELECT last_seen FROM devices
LEFT JOIN e2e_device_keys_json USING (user_id, device_id)
WHERE
user_id = ?
AND NOT hidden
Expand Down