diff options
author | Matthew Hodgson <matthew@matrix.org> | 2017-11-07 10:41:55 +0000 |
---|---|---|
committer | Matthew Hodgson <matthew@matrix.org> | 2017-11-07 10:41:55 +0000 |
commit | 631fa4a1b71a563161b9f1ee91fb08ca10691e98 (patch) | |
tree | 4ed301e1886c5a1837458c80e3eed8f7a3780bfa /synapse/storage | |
parent | s/users_in_pubic_room/users_in_public_rooms/g (diff) | |
download | synapse-631fa4a1b71a563161b9f1ee91fb08ca10691e98.tar.xz |
create new indexes before dropping old ones to keep safetynet in place
Diffstat (limited to 'synapse/storage')
-rw-r--r-- | synapse/storage/schema/delta/46/user_dir_typos.sql | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/storage/schema/delta/46/user_dir_typos.sql b/synapse/storage/schema/delta/46/user_dir_typos.sql index 83ac0f2cef..d9505f8da1 100644 --- a/synapse/storage/schema/delta/46/user_dir_typos.sql +++ b/synapse/storage/schema/delta/46/user_dir_typos.sql @@ -16,7 +16,9 @@ -- this is just embarassing :| ALTER TABLE users_in_pubic_room RENAME TO users_in_public_rooms; -DROP INDEX users_in_pubic_room_room_idx; -DROP INDEX users_in_pubic_room_user_idx; +-- this is only 300K rows on matrix.org and takes ~3s to generate the index, +-- so is hopefully not going to block anyone else for that long... CREATE INDEX users_in_public_rooms_room_idx ON users_in_public_rooms(room_id); CREATE UNIQUE INDEX users_in_public_rooms_user_idx ON users_in_public_rooms(user_id); +DROP INDEX users_in_pubic_room_room_idx; +DROP INDEX users_in_pubic_room_user_idx; |