diff --git a/go.mod b/go.mod index d51f0a33e..4eedbbbac 100644 --- a/go.mod +++ b/go.mod @@ -65,3 +65,5 @@ require ( gopkg.in/macaroon.v2 v2.1.0 gopkg.in/yaml.v2 v2.2.2 ) + +go 1.13 diff --git a/syncapi/storage/invites_table.go b/syncapi/storage/invites_table.go index 9f52087f6..b90b1f383 100644 --- a/syncapi/storage/invites_table.go +++ b/syncapi/storage/invites_table.go @@ -9,6 +9,9 @@ import ( ) const inviteEventsSchema = ` +-- This sequence is shared between all the tables generated from kafka logs. +CREATE SEQUENCE IF NOT EXISTS syncapi_stream_id; + CREATE TABLE IF NOT EXISTS syncapi_invite_events ( id BIGINT PRIMARY KEY DEFAULT nextval('syncapi_stream_id'), event_id TEXT NOT NULL,