summary refs log tree commit diff
path: root/synapse/storage/roommember.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-04-04 17:07:43 +0100
committerErik Johnston <erik@matrix.org>2016-04-04 17:07:43 +0100
commit92ab45a330c2d6c4e896786135e93b6cabfad1ea (patch)
treec10a74370002b2d769cbff707434e1cd16ffb12a /synapse/storage/roommember.py
parentStore invites in a separate table. (diff)
downloadsynapse-92ab45a330c2d6c4e896786135e93b6cabfad1ea.tar.xz
Add upgrade path, rename table
Diffstat (limited to 'synapse/storage/roommember.py')
-rw-r--r--synapse/storage/roommember.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/storage/roommember.py b/synapse/storage/roommember.py
index 4c026b33ae..abe5942744 100644
--- a/synapse/storage/roommember.py
+++ b/synapse/storage/roommember.py
@@ -75,7 +75,7 @@ class RoomMemberStore(SQLBaseStore):
                 if event.membership == Membership.INVITE:
                     self._simple_insert_txn(
                         txn,
-                        table="invites",
+                        table="local_invites",
                         values={
                             "event_id": event.event_id,
                             "invitee": event.state_key,
@@ -86,7 +86,7 @@ class RoomMemberStore(SQLBaseStore):
                     )
                 else:
                     sql = (
-                        "UPDATE invites SET stream_id = ?, replaced_by = ? WHERE"
+                        "UPDATE local_invites SET stream_id = ?, replaced_by = ? WHERE"
                         " room_id = ? AND invitee = ? AND locally_rejected is NULL"
                         " AND replaced_by is NULL"
                     )
@@ -239,7 +239,7 @@ class RoomMemberStore(SQLBaseStore):
         if do_invite:
             sql = (
                 "SELECT i.room_id, inviter, i.event_id, e.stream_ordering"
-                " FROM invites as i"
+                " FROM local_invites as i"
                 " INNER JOIN events as e USING (event_id)"
                 " WHERE invitee = ? AND locally_rejected is NULL"
                 " AND replaced_by is NULL"