Revert "Add event_stream_ordering column to membership state tables (#14979)"

This reverts commit 5fdc12f482.
This commit is contained in:
David Robertson 2023-02-07 15:26:55 +00:00
parent f630536a94
commit 9cd7610f86
No known key found for this signature in database
GPG key ID: 903ECE108A39DEDD
4 changed files with 11 additions and 145 deletions

View file

@ -1779,7 +1779,7 @@ class EventsWorkerStore(SQLBaseStore):
txn: LoggingTransaction,
) -> List[Tuple[int, str, str, str, str, str, str, str, bool, bool]]:
sql = (
"SELECT out.event_stream_ordering, e.event_id, e.room_id, e.type,"
"SELECT event_stream_ordering, e.event_id, e.room_id, e.type,"
" se.state_key, redacts, relates_to_id, membership, rejections.reason IS NOT NULL,"
" e.outlier"
" FROM events AS e"
@ -1791,10 +1791,10 @@ class EventsWorkerStore(SQLBaseStore):
" LEFT JOIN event_relations USING (event_id)"
" LEFT JOIN room_memberships USING (event_id)"
" LEFT JOIN rejections USING (event_id)"
" WHERE ? < out.event_stream_ordering"
" AND out.event_stream_ordering <= ?"
" WHERE ? < event_stream_ordering"
" AND event_stream_ordering <= ?"
" AND out.instance_name = ?"
" ORDER BY out.event_stream_ordering ASC"
" ORDER BY event_stream_ordering ASC"
)
txn.execute(sql, (last_id, current_id, instance_name))