From b8cfaad0f7535f35f201704d7817e8fabd98a583 Mon Sep 17 00:00:00 2001 From: Pushpam Choudhary Date: Mon, 27 Jan 2020 01:15:43 +0530 Subject: [PATCH] Add create sequence in invites_table.go in syncapi --- syncapi/storage/postgres/invites_table.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/syncapi/storage/postgres/invites_table.go b/syncapi/storage/postgres/invites_table.go index ca4bbeb5c..47b0efc1e 100644 --- a/syncapi/storage/postgres/invites_table.go +++ b/syncapi/storage/postgres/invites_table.go @@ -25,6 +25,8 @@ 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,