This commit is contained in:
Mark Haines 2017-09-20 14:23:31 +01:00
parent c370ae1217
commit 6f0f922fad
2 changed files with 7 additions and 6 deletions

View file

@ -5,7 +5,6 @@ import (
"database/sql"
"github.com/matrix-org/dendrite/common"
"github.com/matrix-org/gomatrixserverlib"
)
@ -15,13 +14,16 @@ CREATE TABLE IF NOT EXISTS syncapi_invite_events (
event_id TEXT NOT NULL,
room_id TEXT NOT NULL,
target_user_id TEXT NOT NULL,
event_json TEXT NOT NULL,
event_json TEXT NOT NULL
);
-- For looking up the invites for a given user.
CREATE INDEX IF NOT EXISTS syncapi_target_user_id_idx
ON syncapi_invite_events (target_user_id, id)
);
CREATE INDEX IF NOT EXISTS syncapi_invites_target_user_id_idx
ON syncapi_invite_events (target_user_id, id);
-- For deleting old invites
CREATE INDEX IF NOT EXISTS syncapi_invites_event_id_idx
ON syncapi_invite_events(target_user_id, id);
`
const insertInviteEventSQL = "" +

View file

@ -30,7 +30,6 @@ const outputRoomEventsSchema = `
CREATE SEQUENCE IF NOT EXISTS syncapi_stream_id;
-- Stores output room events received from the roomserver.
CREATE SEQUENCE IF NOT EXISTS syncapi_output_room_event_id_seq
CREATE TABLE IF NOT EXISTS syncapi_output_room_events (
-- An incrementing ID which denotes the position in the log that this event resides at.
-- NB: 'serial' makes no guarantees to increment by 1 every time, only that it increments.