summary refs log tree commit diff
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2018-02-14 16:42:19 +0000
committerRichard van der Hoff <richard@matrix.org>2018-02-14 16:42:19 +0000
commit39bf47319f002614d8de11948d09db7648b26315 (patch)
treec7001eeba0b2dd046996683ce8c2a1df63ae6b69
parentpurge_history: handle sqlite asshattery (diff)
downloadsynapse-39bf47319f002614d8de11948d09db7648b26315.tar.xz
purge_history: fix sqlite syntax error
apparently sqlite insists on indexes being named
Diffstat (limited to '')
-rw-r--r--synapse/storage/events.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py
index 90e910f615..28cce2979c 100644
--- a/synapse/storage/events.py
+++ b/synapse/storage/events.py
@@ -2112,7 +2112,10 @@ class EventsStore(SQLBaseStore):
 
         # create an index on should_delete because later we'll be looking for
         # the should_delete / shouldn't_delete subsets
-        txn.execute("CREATE INDEX ON events_to_purge(should_delete)")
+        txn.execute(
+            "CREATE INDEX events_to_purge_should_delete"
+            " ON events_to_purge(should_delete)",
+        )
 
         # First ensure that we're not about to delete all the forward extremeties
         txn.execute(