mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-09-17 02:34:37 -04:00
Docs and indents
This commit is contained in:
parent
92ab45a330
commit
0c53d750e7
3 changed files with 31 additions and 14 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue