summary refs log tree commit diff
path: root/synapse/storage/schema
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-04-04 18:02:48 +0100
committerErik Johnston <erik@matrix.org>2016-04-04 18:02:48 +0100
commit0c53d750e7145f57ed97c544efdb846cc9e37b67 (patch)
tree1a001c069a1e4f6351c2cd486025d3c4c2536d8d /synapse/storage/schema
parentAdd upgrade path, rename table (diff)
downloadsynapse-0c53d750e7145f57ed97c544efdb846cc9e37b67.tar.xz
Docs and indents
Diffstat (limited to 'synapse/storage/schema')
-rw-r--r--synapse/storage/schema/delta/31/invites.sql22
1 files changed, 11 insertions, 11 deletions
diff --git a/synapse/storage/schema/delta/31/invites.sql b/synapse/storage/schema/delta/31/invites.sql
index 1c83430da4..2c57846d5a 100644
--- a/synapse/storage/schema/delta/31/invites.sql
+++ b/synapse/storage/schema/delta/31/invites.sql
@@ -26,17 +26,17 @@ CREATE TABLE local_invites(
 
 -- Insert all invites for local users into new `invites` table
 INSERT INTO local_invites SELECT
-    stream_ordering as stream_id,
-    sender as inviter,
-    state_key as invitee,
-    event_id,
-    room_id,
-    NULL as locally_rejected,
-    NULL as replaced_by
-FROM events
-NATURAL JOIN current_state_events
-NATURAL JOIN room_memberships
-WHERE membership = 'invite'  AND state_key IN (SELECT name FROM users);
+        stream_ordering as stream_id,
+        sender as inviter,
+        state_key as invitee,
+        event_id,
+        room_id,
+        NULL as locally_rejected,
+        NULL as replaced_by
+    FROM events
+    NATURAL JOIN current_state_events
+    NATURAL JOIN room_memberships
+    WHERE membership = 'invite'  AND state_key IN (SELECT name FROM users);
 
 CREATE INDEX local_invites_id ON local_invites(stream_id);
 CREATE INDEX local_invites_for_user_idx ON local_invites(invitee, locally_rejected, replaced_by, room_id);