From fa417ff21862e05cbf12d98e45acc919c5755596 Mon Sep 17 00:00:00 2001 From: Dan Wells Date: Mon, 17 Mar 2014 16:47:55 -0400 Subject: [PATCH] LP#1253163: Replace dropped unique index, if we can Not sure if this is necessary, but since we drop this index, we might want to make an effort to recreate it if we can (but don't die if we cannot). Signed-off-by: Dan Wells Signed-off-by: Ben Shum --- .../Pg/upgrade/XXXX.schema.authority.in-line-headings.sql | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.authority.in-line-headings.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.authority.in-line-headings.sql index 64fe5f6e0e..3b68093f05 100644 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.authority.in-line-headings.sql +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.authority.in-line-headings.sql @@ -41,6 +41,12 @@ ALTER FUNCTION authority.simple_heading_set(TEXT) STABLE STRICT; COMMIT; +\qecho . +\qecho This index might fail, and is outside the transaction for that reason. +\qecho If it fails, you probably did not have it in the first place. +\qecho . +CREATE UNIQUE INDEX unique_by_heading_and_thesaurus ON authority.record_entry (heading) WHERE deleted IS FALSE or deleted = FALSE; + ALTER TABLE authority.record_entry ENABLE TRIGGER a_marcxml_is_well_formed; ALTER TABLE authority.record_entry ENABLE TRIGGER aaa_auth_ingest_or_delete; ALTER TABLE authority.record_entry ENABLE TRIGGER b_maintain_901; -- 2.43.2