From 0870039fa2f6bf1e3b72a098254a7187e129fc1c Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Thu, 16 Jun 2011 10:16:39 -0400 Subject: [PATCH] Move the user/dbs/lp797304_lp797307 upgrade script into place with a number Signed-off-by: Mike Rylander --- Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +- ...s.sql => 0559.schema.biblio.extract_located_uris.sql} | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) rename Open-ILS/src/sql/Pg/upgrade/{XXXX.biblio.extract_located_uris.sql => 0559.schema.biblio.extract_located_uris.sql} (93%) diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index c76fcf180a..e87520cae1 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -86,7 +86,7 @@ CREATE TRIGGER no_overlapping_deps BEFORE INSERT OR UPDATE ON config.db_patch_dependencies FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates'); -INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0558', :eg_version); -- miker +INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0559', :eg_version); -- dbs via miker CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.biblio.extract_located_uris.sql b/Open-ILS/src/sql/Pg/upgrade/0559.schema.biblio.extract_located_uris.sql similarity index 93% rename from Open-ILS/src/sql/Pg/upgrade/XXXX.biblio.extract_located_uris.sql rename to Open-ILS/src/sql/Pg/upgrade/0559.schema.biblio.extract_located_uris.sql index 434443df05..bdb49bbbc6 100644 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.biblio.extract_located_uris.sql +++ b/Open-ILS/src/sql/Pg/upgrade/0559.schema.biblio.extract_located_uris.sql @@ -1,3 +1,16 @@ +-- Evergreen DB patch 0559.schema.biblio.extract_located_uris.sql +-- +-- * Add a stored procedure to reingest problematic URIs +-- * Avoid duplicate row issues in biblio.extract_located_uris +-- * Fix LP 797304 and 797307 - asset.uri parsing bugs +-- +BEGIN; + + +-- check whether patch can be applied +SELECT evergreen.upgrade_deps_block_check('0559', :eg_version); + +-- FIXME: add/check SQL statements to perform the upgrade CREATE OR REPLACE FUNCTION biblio.extract_located_uris( bib_id BIGINT, marcxml TEXT, editor_id INT ) RETURNS VOID AS $func$ DECLARE uris TEXT[]; @@ -135,3 +148,6 @@ $func$ LANGUAGE PLPGSQL; -- Kick off the reingest; this may take a while SELECT biblio.reingest_uris(); + + +COMMIT; -- 2.11.0