summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-09-21 16:46:59 +0100
committerErik Johnston <erik@matrix.org>2016-09-21 16:46:59 +0100
commit8009d843647a8c693340c7b9ec341066fb6db3b6 (patch)
tree61f6fa9b582b0ef4449d767d2507e5fb6c39df1b /synapse
parentRemove spurious AS clause (diff)
downloadsynapse-8009d843647a8c693340c7b9ec341066fb6db3b6.tar.xz
Match against event_id, rather than room_id
Diffstat (limited to 'synapse')
-rw-r--r--synapse/storage/schema/delta/36/readd_public_rooms.sql2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/storage/schema/delta/36/readd_public_rooms.sql b/synapse/storage/schema/delta/36/readd_public_rooms.sql
index 5460a350b6..90d8fd18f9 100644
--- a/synapse/storage/schema/delta/36/readd_public_rooms.sql
+++ b/synapse/storage/schema/delta/36/readd_public_rooms.sql
@@ -16,7 +16,7 @@
 -- Re-add some entries to stream_ordering_to_exterm that were incorrectly deleted
 INSERT INTO stream_ordering_to_exterm (stream_ordering, room_id, event_id)
     SELECT
-        (SELECT max(stream_ordering) FROM events where room_id = e.room_id) AS stream_ordering,
+        (SELECT stream_ordering FROM events where event_id = e.event_id) AS stream_ordering,
         room_id,
         event_id
     FROM event_forward_extremities AS e