From: Chris Sharp Date: Wed, 22 Oct 2014 19:09:18 +0000 (-0400) Subject: PINES already has 0875 too. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=1fcb15921edecae48826b0e98042cfe027798f5c;p=evergreen%2Fpines.git PINES already has 0875 too. --- diff --git a/Open-ILS/src/sql/Pg/version-upgrade/2.5.3-2.6.0-upgrade-db.sql b/Open-ILS/src/sql/Pg/version-upgrade/2.5.3-2.6.0-upgrade-db.sql index 90aa0d3ea0..9d7814cba2 100644 --- a/Open-ILS/src/sql/Pg/version-upgrade/2.5.3-2.6.0-upgrade-db.sql +++ b/Open-ILS/src/sql/Pg/version-upgrade/2.5.3-2.6.0-upgrade-db.sql @@ -5573,37 +5573,37 @@ END; $func$ LANGUAGE PLPGSQL; -SELECT evergreen.upgrade_deps_block_check('0875', :eg_version); - -ALTER TABLE authority.record_entry ADD COLUMN heading TEXT, ADD COLUMN simple_heading TEXT; - -DROP INDEX IF EXISTS authority.unique_by_heading_and_thesaurus; -DROP INDEX IF EXISTS authority.by_heading_and_thesaurus; -DROP INDEX IF EXISTS authority.by_heading; - --- Update without indexes for HOT update -UPDATE authority.record_entry - SET heading = authority.normalize_heading( marc ), - simple_heading = authority.simple_normalize_heading( marc ); - -CREATE INDEX by_heading_and_thesaurus ON authority.record_entry (heading) WHERE deleted IS FALSE or deleted = FALSE; -CREATE INDEX by_heading ON authority.record_entry (simple_heading) WHERE deleted IS FALSE or deleted = FALSE; - --- Add the trigger -CREATE OR REPLACE FUNCTION authority.normalize_heading_for_upsert () RETURNS TRIGGER AS $f$ -BEGIN - NEW.heading := authority.normalize_heading( NEW.marc ); - NEW.simple_heading := authority.simple_normalize_heading( NEW.marc ); - RETURN NEW; -END; -$f$ LANGUAGE PLPGSQL; - -CREATE TRIGGER update_headings_tgr BEFORE INSERT OR UPDATE ON authority.record_entry FOR EACH ROW EXECUTE PROCEDURE authority.normalize_heading_for_upsert(); - -ALTER FUNCTION authority.normalize_heading(TEXT, BOOL) STABLE STRICT; -ALTER FUNCTION authority.normalize_heading(TEXT) STABLE STRICT; -ALTER FUNCTION authority.simple_normalize_heading(TEXT) STABLE STRICT; -ALTER FUNCTION authority.simple_heading_set(TEXT) STABLE STRICT; +--SELECT evergreen.upgrade_deps_block_check('0875', :eg_version); +-- +--ALTER TABLE authority.record_entry ADD COLUMN heading TEXT, ADD COLUMN simple_heading TEXT; +-- +--DROP INDEX IF EXISTS authority.unique_by_heading_and_thesaurus; +--DROP INDEX IF EXISTS authority.by_heading_and_thesaurus; +--DROP INDEX IF EXISTS authority.by_heading; +-- +---- Update without indexes for HOT update +--UPDATE authority.record_entry +-- SET heading = authority.normalize_heading( marc ), +-- simple_heading = authority.simple_normalize_heading( marc ); +-- +--CREATE INDEX by_heading_and_thesaurus ON authority.record_entry (heading) WHERE deleted IS FALSE or deleted = FALSE; +--CREATE INDEX by_heading ON authority.record_entry (simple_heading) WHERE deleted IS FALSE or deleted = FALSE; +-- +---- Add the trigger +--CREATE OR REPLACE FUNCTION authority.normalize_heading_for_upsert () RETURNS TRIGGER AS $f$ +--BEGIN +-- NEW.heading := authority.normalize_heading( NEW.marc ); +-- NEW.simple_heading := authority.simple_normalize_heading( NEW.marc ); +-- RETURN NEW; +--END; +--$f$ LANGUAGE PLPGSQL; +-- +--CREATE TRIGGER update_headings_tgr BEFORE INSERT OR UPDATE ON authority.record_entry FOR EACH ROW EXECUTE PROCEDURE authority.normalize_heading_for_upsert(); +-- +--ALTER FUNCTION authority.normalize_heading(TEXT, BOOL) STABLE STRICT; +--ALTER FUNCTION authority.normalize_heading(TEXT) STABLE STRICT; +--ALTER FUNCTION authority.simple_normalize_heading(TEXT) STABLE STRICT; +--ALTER FUNCTION authority.simple_heading_set(TEXT) STABLE STRICT;