From f13cef999a85669cf93cee128f333dd417f4f08a Mon Sep 17 00:00:00 2001 From: Mark Zealey Date: Sat, 4 Nov 2023 09:03:16 +0000 Subject: [PATCH] Attempted fixes --- sql/pg.sql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sql/pg.sql b/sql/pg.sql index 458ea8f7a72..e072e33e840 100644 --- a/sql/pg.sql +++ b/sql/pg.sql @@ -58,7 +58,7 @@ CREATE TABLE rostergroups ( username text NOT NULL, jid text NOT NULL, grp text NOT NULL, - PRIMARY KEY (username, jid) + PRIMARY KEY (username, jid, grp) ); CREATE TABLE sr_group ( @@ -173,7 +173,8 @@ CREATE TABLE privacy_list ( CREATE UNIQUE INDEX i_privacy_list_username_name ON privacy_list USING btree (username, name); CREATE TABLE privacy_list_data ( - id bigint PRIMARY KEY REFERENCES privacy_list(id) ON DELETE CASCADE, + seq BIGSERIAL PRIMARY KEY, + id bigint REFERENCES privacy_list(id) ON DELETE CASCADE, t character(1) NOT NULL, value text NOT NULL, action character(1) NOT NULL,