summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-05-31 17:29:12 +0100
committerErik Johnston <erik@matrix.org>2017-05-31 17:29:12 +0100
commit5dd1b2c525cb786614d1503757bf52a7086f3bf9 (patch)
tree367c0f34a10ed12c4c784e44545968ba64f96111 /synapse
parentComment briefly on how we keep user_directory up to date (diff)
downloadsynapse-5dd1b2c525cb786614d1503757bf52a7086f3bf9.tar.xz
Use unique indices
Diffstat (limited to 'synapse')
-rw-r--r--synapse/storage/schema/delta/42/user_dir.py4
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);
 """