mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-12 09:23:09 -06:00
Fix SQL
This commit is contained in:
parent
c370ae1217
commit
6f0f922fad
|
|
@ -5,7 +5,6 @@ import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
|
|
||||||
"github.com/matrix-org/dendrite/common"
|
"github.com/matrix-org/dendrite/common"
|
||||||
|
|
||||||
"github.com/matrix-org/gomatrixserverlib"
|
"github.com/matrix-org/gomatrixserverlib"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -15,13 +14,16 @@ CREATE TABLE IF NOT EXISTS syncapi_invite_events (
|
||||||
event_id TEXT NOT NULL,
|
event_id TEXT NOT NULL,
|
||||||
room_id TEXT NOT NULL,
|
room_id TEXT NOT NULL,
|
||||||
target_user_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.
|
-- For looking up the invites for a given user.
|
||||||
CREATE INDEX IF NOT EXISTS syncapi_target_user_id_idx
|
CREATE INDEX IF NOT EXISTS syncapi_invites_target_user_id_idx
|
||||||
ON syncapi_invite_events (target_user_id, id)
|
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 = "" +
|
const insertInviteEventSQL = "" +
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@ const outputRoomEventsSchema = `
|
||||||
CREATE SEQUENCE IF NOT EXISTS syncapi_stream_id;
|
CREATE SEQUENCE IF NOT EXISTS syncapi_stream_id;
|
||||||
|
|
||||||
-- Stores output room events received from the roomserver.
|
-- 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 (
|
CREATE TABLE IF NOT EXISTS syncapi_output_room_events (
|
||||||
-- An incrementing ID which denotes the position in the log that this event resides at.
|
-- 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.
|
-- NB: 'serial' makes no guarantees to increment by 1 every time, only that it increments.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue