summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/storage')
-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);
 """