Changed the constraint on the biblio.monograph_part table to allow for a
monograph part to be created if a duplicate deleted version is found.
Signed-off-by: Steven Callender <stevecallender@esilibrary.com>
--- /dev/null
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+ALTER TABLE biblio.monograph_part DROP CONSTRAINT "record_label_unique";
+CREATE UNIQUE INDEX CONCURRENTLY record_label_unique_idx ON biblio.monograph_part (record, label) WHERE deleted = FALSE;
+
+COMMIT;