Add missing index

This commit is contained in:
Till Faelligen 2023-02-01 14:23:07 +01:00
parent ab80cea3d1
commit f51f5f2143
No known key found for this signature in database
GPG key ID: ACCDC9606D472758
2 changed files with 4 additions and 1 deletions

View file

@ -71,7 +71,7 @@ CREATE TABLE IF NOT EXISTS roomserver_events (
);
-- Create an index which helps in resolving membership events (event_type_nid = 5) - (used for history visibility)
create index if not exists roomserver_events_history_visibility_idx on roomserver_events (room_nid, event_state_key_nid) where (event_type_nid = 5);
CREATE INDEX IF NOT EXISTS roomserver_events_history_visibility_idx ON roomserver_events (room_nid, event_state_key_nid) where (event_type_nid = 5);
`
const insertEventSQL = "" +

View file

@ -77,6 +77,9 @@ CREATE INDEX IF NOT EXISTS syncapi_output_room_events_room_id_idx ON syncapi_out
CREATE INDEX IF NOT EXISTS syncapi_output_room_events_exclude_from_sync_idx ON syncapi_output_room_events (exclude_from_sync);
CREATE INDEX IF NOT EXISTS syncapi_output_room_events_add_state_ids_idx ON syncapi_output_room_events ((add_state_ids IS NOT NULL));
CREATE INDEX IF NOT EXISTS syncapi_output_room_events_remove_state_ids_idx ON syncapi_output_room_events ((remove_state_ids IS NOT NULL));
CREATE INDEX IF NOT EXISTS syncapi_output_room_events_recent_events_idx ON syncapi_output_room_events (room_id, exclude_from_sync, id, sender, type);
`
const insertEventSQL = "" +