anonymousland-synapse/synapse/storage/schema/main/delta/74
Nick Mills-Barrett e6af49fbea
Reintroduce membership tables event stream ordering (#15128)
* Add `event_stream_ordering` column to membership state tables

Specifically this adds the column to `current_state_events`,
`local_current_membership` and `room_memberships`. Each of these tables
is regularly joined with the `events` table to get the stream ordering
and denormalising this into each table will yield significant query
performance improvements once used.

* Make denormalised `event_stream_ordering` columns foreign keys
* Add comment in schema file explaining new denormalised columns
* Add triggers to enforce consistency of `event_stream_ordering` columns
* Re-order purge room tables to account for foreign keys
* Bump schema version to 75

Co-authored-by: David Robertson <david.m.robertson1@gmail.com>
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2023-03-24 11:44:01 +00:00
..
01_user_directory_stale_remote_users.sql Preparatory work to fix the user directory assuming that any remote membership state events represent a profile change. [rei:userdirpriv] (#14755) 2023-03-16 09:55:19 +00:00
01membership_tables_event_stream_ordering.sql Reintroduce membership tables event stream ordering (#15128) 2023-03-24 11:44:01 +00:00
02membership_tables_event_stream_ordering_triggers.py Reintroduce membership tables event stream ordering (#15128) 2023-03-24 11:44:01 +00:00
90COMMENTS_destinations.sql.postgres Add schema comments about the destinations and destination_rooms tables. (#15247) 2023-03-15 09:25:58 +00:00