From 9236d55d69685113bd81fecb7fe23e8ba084845e Mon Sep 17 00:00:00 2001 From: Mark Haines Date: Wed, 23 Aug 2017 14:28:32 +0100 Subject: [PATCH] WIP AMEND ME --- .../matrix-org/dendrite/syncapi/storage/invites_table.go | 1 + .../dendrite/syncapi/storage/output_room_events_table.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 src/github.com/matrix-org/dendrite/syncapi/storage/invites_table.go diff --git a/src/github.com/matrix-org/dendrite/syncapi/storage/invites_table.go b/src/github.com/matrix-org/dendrite/syncapi/storage/invites_table.go new file mode 100644 index 000000000..82be0547e --- /dev/null +++ b/src/github.com/matrix-org/dendrite/syncapi/storage/invites_table.go @@ -0,0 +1 @@ +package storage diff --git a/src/github.com/matrix-org/dendrite/syncapi/storage/output_room_events_table.go b/src/github.com/matrix-org/dendrite/syncapi/storage/output_room_events_table.go index 93774d1f1..937462d3b 100644 --- a/src/github.com/matrix-org/dendrite/syncapi/storage/output_room_events_table.go +++ b/src/github.com/matrix-org/dendrite/syncapi/storage/output_room_events_table.go @@ -26,11 +26,12 @@ import ( const outputRoomEventsSchema = ` -- 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. -- This isn't a problem for us since we just want to order by this field. - id BIGSERIAL PRIMARY KEY, + id BIGINT PRIMARY KEY DEFAULT nextval('syncapi_output_room_event_id_seq'), -- The event ID for the event event_id TEXT NOT NULL, -- The 'room_id' key for the event.