summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@matrix.org>2018-04-28 22:32:24 +0100
committerMatthew Hodgson <matthew@matrix.org>2018-04-28 22:32:24 +0100
commit006e18b6bbca0721e4de957e641ef64a2f0903cf (patch)
treef2246a0a3a3e029e21cdd90febeac052060b2edc
parentmake it work with sqlite (diff)
downloadsynapse-006e18b6bbca0721e4de957e641ef64a2f0903cf.tar.xz
pep8
-rw-r--r--synapse/storage/schema/delta/48/group_unique_indexes.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/synapse/storage/schema/delta/48/group_unique_indexes.py b/synapse/storage/schema/delta/48/group_unique_indexes.py
index c1f5881b3e..b653a987b1 100644
--- a/synapse/storage/schema/delta/48/group_unique_indexes.py
+++ b/synapse/storage/schema/delta/48/group_unique_indexes.py
@@ -32,23 +32,25 @@ DROP INDEX groups_rooms_r_idx;
 CREATE INDEX group_rooms_r_idx ON group_rooms(room_id);
 """
 
+
 def run_create(cur, database_engine, *args, **kwargs):
-    rowid = "ctid" if isinstance(database_engine, PostgresEngine) then "rowid"
+    rowid = "ctid" if isinstance(database_engine, PostgresEngine) else "rowid"
 
     # remove duplicates from group_users & group_invites tables
     cur.execute("""
         DELETE FROM group_users WHERE %s NOT IN (
            SELECT min(%s) FROM group_users GROUP BY group_id, user_id
         );
-    """ % (rowid, rowid));
+    """ % (rowid, rowid))
     cur.execute("""
         DELETE FROM group_invites WHERE %s NOT IN (
            SELECT min(%s) FROM group_invites GROUP BY group_id, user_id
         );
-    """ % (rowid, rowid));
+    """ % (rowid, rowid))
 
     for statement in get_statements(FIX_INDEXES.splitlines()):
         cur.execute(statement)
 
+
 def run_upgrade(*args, **kwargs):
     pass