summary refs log tree commit diff
path: root/synapse/storage/devices.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-03-01 15:56:30 +0000
committerErik Johnston <erik@matrix.org>2017-03-01 15:56:30 +0000
commitd766343668e63a7572dcfe571d38ea3e143f3c1c (patch)
tree0ba6880b76fcb0e485f5a11dbc40de6d1052620e /synapse/storage/devices.py
parentClobber old device list stream entries (diff)
downloadsynapse-d766343668e63a7572dcfe571d38ea3e143f3c1c.tar.xz
Add index to device_lists_stream
Diffstat (limited to '')
-rw-r--r--synapse/storage/devices.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/synapse/storage/devices.py b/synapse/storage/devices.py
index f9ed18d2aa..ed659b7001 100644
--- a/synapse/storage/devices.py
+++ b/synapse/storage/devices.py
@@ -33,6 +33,13 @@ class DeviceStore(SQLBaseStore):
             self._prune_old_outbound_device_pokes, 60 * 60 * 1000
         )
 
+        self.register_background_index_update(
+            "device_inbox_stream_index",
+            index_name="device_inbox_stream_id_user_id",
+            table="device_inbox",
+            columns=["stream_id", "user_id"],
+        )
+
     @defer.inlineCallbacks
     def store_device(self, user_id, device_id,
                      initial_device_display_name):