Skip to content
Snippets Groups Projects
Commit dc78db8c authored by Erik Johnston's avatar Erik Johnston
Browse files

Update correct table

parent 4f78108d
No related branches found
No related tags found
No related merge requests found
...@@ -13,10 +13,14 @@ ...@@ -13,10 +13,14 @@
* limitations under the License. * limitations under the License.
*/ */
-- Re-add some entries to stream_ordering_to_exterm that were incorrectly deleted
INSERT INTO public_room_list_stream (stream_id, room_id, visibility) INSERT INTO stream_ordering_to_exterm (stream_ordering, room_id, event_id)
SELECT 1, room_id, is_public FROM rooms AS r SELECT
WHERE is_public = CAST(1 AS BOOLEAN) (SELECT max(stream_ordering) FROM events where room_id = e.room_id) AS stream_ordering,
AND NOT EXISTS ( room_id,
SELECT room_id FROM stream_ordering_to_exterm WHERE room_id = r.room_id event_id
FROM event_forward_extremities AS e
WHERE NOT EXISTS (
SELECT room_id FROM stream_ordering_to_exterm AS s
WHERE s.room_id = e.room_id
); );
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment