From: Steven Callender Date: Wed, 27 Apr 2016 16:05:48 +0000 (-0400) Subject: LP#1569884 Updated base schema with monograph parts index. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=3ed20ce9fc08902823a81fc3674d680b6ea7fd62;p=evergreen%2Ftadl.git LP#1569884 Updated base schema with monograph parts index. Signed-off-by: Steven Callender Signed-off-by: Jason Stephenson Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/sql/Pg/010.schema.biblio.sql b/Open-ILS/src/sql/Pg/010.schema.biblio.sql index ff0542d21d..3312edfc7f 100644 --- a/Open-ILS/src/sql/Pg/010.schema.biblio.sql +++ b/Open-ILS/src/sql/Pg/010.schema.biblio.sql @@ -99,8 +99,8 @@ CREATE TABLE biblio.monograph_part ( label TEXT NOT NULL, label_sortkey TEXT NOT NULL, deleted BOOL NOT NULL DEFAULT FALSE, - CONSTRAINT record_label_unique UNIQUE (record,label) ); +CREATE UNIQUE INDEX CONCURRENTLY record_label_unique_idx ON biblio.monograph_part (record, label) WHERE deleted = FALSE; CREATE OR REPLACE FUNCTION biblio.normalize_biblio_monograph_part_sortkey () RETURNS TRIGGER AS $$ BEGIN