Fix Postgres

This commit is contained in:
Neil Alexander 2021-01-20 17:43:58 +00:00
parent a65a5ca0fd
commit 12d93eb6ed
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -45,11 +45,10 @@ CREATE TABLE IF NOT EXISTS syncapi_memberships (
-- The stream position of the change
stream_pos BIGINT NOT NULL,
-- The topological position of the change in the room
topological_pos BIGINT NOT NULL
topological_pos BIGINT NOT NULL,
-- Unique index
CONSTRAINT syncapi_memberships_unique UNIQUE (room_id, user_id, membership)
);
CREATE UNIQUE INDEX IF NOT EXISTS syncapi_memberships_unique
ON syncapi_memberships(room_id, user_id, membership);
`
const upsertMembershipSQL = "" +