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

Commit 36269c7

Browse files
David Robertsonerikjohnston
authored andcommitted
Fix UndefinedColumn: column "key_json" does not exist errors when handling users with more than 50 non-E2E devices (#14580)
1 parent 4fa2ff5 commit 36269c7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

synapse/storage/databases/main/devices.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1564,6 +1564,7 @@ async def check_too_many_devices_for_user(self, user_id: str) -> Collection[str]
15641564
# that ensures we keep at most 50 devices.
15651565
sql = """
15661566
SELECT last_seen FROM devices
1567+
LEFT JOIN e2e_device_keys_json USING (user_id, device_id)
15671568
WHERE
15681569
user_id = ?
15691570
AND NOT hidden

0 commit comments

Comments
 (0)