mirror of
https://github.com/element-hq/synapse
synced 2024-08-19 02:10:55 +00:00
create new indexes before dropping old ones to keep safetynet in place
This commit is contained in:
parent
4ad883398f
commit
631fa4a1b7
1 changed files with 4 additions and 2 deletions
|
@ -16,7 +16,9 @@
|
||||||
-- this is just embarassing :|
|
-- this is just embarassing :|
|
||||||
ALTER TABLE users_in_pubic_room RENAME TO users_in_public_rooms;
|
ALTER TABLE users_in_pubic_room RENAME TO users_in_public_rooms;
|
||||||
|
|
||||||
DROP INDEX users_in_pubic_room_room_idx;
|
-- this is only 300K rows on matrix.org and takes ~3s to generate the index,
|
||||||
DROP INDEX users_in_pubic_room_user_idx;
|
-- 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 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);
|
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;
|
||||||
|
|
Loading…
Reference in a new issue