From: miker Date: Wed, 10 Nov 2010 14:52:13 +0000 (+0000) Subject: Move the magic-bib update to the top of the file, avoiding triggers that care about... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b91904ebe82350b27a6bff08055b75aee4177457;p=evergreen%2Fbjwebb.git Move the magic-bib update to the top of the file, avoiding triggers that care about XML namespaces git-svn-id: svn://svn.open-ils.org/ILS/trunk@18683 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql b/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql index 32e11419c..c2c5fadca 100644 --- a/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql +++ b/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql @@ -11,6 +11,8 @@ CREATE INDEX asset_call_number_upper_label_id_owning_lib_idx ON asset.call_numbe \qecho Before starting the transaction: drop some constraints. \qecho If a DROP fails because the constraint doesn't exist, ignore the failure. +-- ARG! VIM! ' + ALTER TABLE permission.grp_perm_map DROP CONSTRAINT grp_perm_map_perm_fkey; ALTER TABLE permission.usr_perm_map DROP CONSTRAINT usr_perm_map_perm_fkey; ALTER TABLE permission.usr_object_perm_map DROP CONSTRAINT usr_object_perm_map_perm_fkey; @@ -21,6 +23,8 @@ ALTER TABLE booking.resource_type DROP CONSTRAINT brt_name_once_per_own BEGIN; +UPDATE biblio.record_entry SET marc = '' WHERE id = -1; + -- Highest-numbered individual upgrade script incorporated herein: INSERT INTO config.upgrade_log (version) VALUES ('0461'); @@ -14857,8 +14861,6 @@ CREATE INDEX claim_lid_idx ON acq.claim( lineitem_detail ); CREATE OR REPLACE RULE protect_bib_rec_delete AS ON DELETE TO biblio.record_entry DO INSTEAD (UPDATE biblio.record_entry SET deleted = TRUE WHERE OLD.id = biblio.record_entry.id; DELETE FROM metabib.metarecord_source_map WHERE source = OLD.id); -UPDATE biblio.record_entry SET marc = '' WHERE id = -1; - CREATE INDEX metabib_title_field_entry_value_idx ON metabib.title_field_entry (SUBSTRING(value,1,1024)) WHERE index_vector = ''::TSVECTOR; CREATE INDEX metabib_author_field_entry_value_idx ON metabib.author_field_entry (SUBSTRING(value,1,1024)) WHERE index_vector = ''::TSVECTOR; CREATE INDEX metabib_subject_field_entry_value_idx ON metabib.subject_field_entry (SUBSTRING(value,1,1024)) WHERE index_vector = ''::TSVECTOR;