diff options
author | Erik Johnston <erik@matrix.org> | 2017-05-31 17:29:12 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-05-31 17:29:12 +0100 |
commit | 5dd1b2c525cb786614d1503757bf52a7086f3bf9 (patch) | |
tree | 367c0f34a10ed12c4c784e44545968ba64f96111 /synapse/storage | |
parent | Comment briefly on how we keep user_directory up to date (diff) | |
download | synapse-5dd1b2c525cb786614d1503757bf52a7086f3bf9.tar.xz |
Use unique indices
Diffstat (limited to 'synapse/storage')
-rw-r--r-- | synapse/storage/schema/delta/42/user_dir.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/schema/delta/42/user_dir.py b/synapse/storage/schema/delta/42/user_dir.py index 7e32662928..c34aa5e7d2 100644 --- a/synapse/storage/schema/delta/42/user_dir.py +++ b/synapse/storage/schema/delta/42/user_dir.py @@ -37,7 +37,7 @@ CREATE TABLE user_directory ( ); CREATE INDEX user_directory_room_idx ON user_directory(room_id); -CREATE INDEX user_directory_user_idx ON user_directory(user_id); +CREATE UNIQUE INDEX user_directory_user_idx ON user_directory(user_id); """ @@ -48,7 +48,7 @@ CREATE TABLE user_directory_search ( ); CREATE INDEX user_directory_search_fts_idx ON user_directory_search USING gin(vector); -CREATE INDEX user_directory_search_user_idx ON user_directory_search(user_id); +CREATE UNIQUE INDEX user_directory_search_user_idx ON user_directory_search(user_id); """ |