[open-ils-commits] [GIT] Evergreen ILS branch rel_2_3 updated. d5fb7c530a7181c35dee992779d602d4d29a9e22

Evergreen Git git at git.evergreen-ils.org
Thu May 16 16:22:17 EDT 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_2_3 has been updated
       via  d5fb7c530a7181c35dee992779d602d4d29a9e22 (commit)
      from  7fb90796ba1e05af71325ac7b658c0ea288c2f97 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d5fb7c530a7181c35dee992779d602d4d29a9e22
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Thu May 16 16:12:14 2013 -0400

    Database upgrade script for 2.2.9
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/sql/Pg/version-upgrade/2.2.8-2.2.9-upgrade-db.sql b/Open-ILS/src/sql/Pg/version-upgrade/2.2.8-2.2.9-upgrade-db.sql
new file mode 100644
index 0000000..aa13b29
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/version-upgrade/2.2.8-2.2.9-upgrade-db.sql
@@ -0,0 +1,40 @@
+--Upgrade Script for 2.2.8 to 2.2.9
+\set eg_version '''2.2.9'''
+BEGIN;
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('2.2.9', :eg_version);
+
+SELECT evergreen.upgrade_deps_block_check('0788', :eg_version);
+
+-- New view including 264 as a potential tag for publisher and pubdate
+CREATE OR REPLACE VIEW reporter.old_super_simple_record AS
+SELECT  r.id,
+    r.fingerprint,
+    r.quality,
+    r.tcn_source,
+    r.tcn_value,
+    FIRST(title.value) AS title,
+    FIRST(author.value) AS author,
+    ARRAY_TO_STRING(ARRAY_ACCUM( DISTINCT publisher.value), ', ') AS publisher,
+    ARRAY_TO_STRING(ARRAY_ACCUM( DISTINCT SUBSTRING(pubdate.value FROM $$\d+$$) ), ', ') AS pubdate,
+    ARRAY_ACCUM( DISTINCT REPLACE(SUBSTRING(isbn.value FROM $$^\S+$$), '-', '') ) AS isbn,
+    ARRAY_ACCUM( DISTINCT REGEXP_REPLACE(issn.value, E'^\\S*(\\d{4})[-\\s](\\d{3,4}x?)', E'\\1 \\2') ) AS issn
+  FROM  biblio.record_entry r
+    LEFT JOIN metabib.full_rec title ON (r.id = title.record AND title.tag = '245' AND title.subfield = 'a')
+    LEFT JOIN metabib.full_rec author ON (r.id = author.record AND author.tag IN ('100','110','111') AND author.subfield = 'a')
+    LEFT JOIN metabib.full_rec publisher ON (r.id = publisher.record AND (publisher.tag = '260' OR (publisher.tag = '264' AND publisher.ind2 = '1')) AND publisher.subfield = 'b')
+    LEFT JOIN metabib.full_rec pubdate ON (r.id = pubdate.record AND (pubdate.tag = '260' OR (pubdate.tag = '264' AND pubdate.ind2 = '1')) AND pubdate.subfield = 'c')
+    LEFT JOIN metabib.full_rec isbn ON (r.id = isbn.record AND isbn.tag IN ('024', '020') AND isbn.subfield IN ('a','z'))
+    LEFT JOIN metabib.full_rec issn ON (r.id = issn.record AND issn.tag = '022' AND issn.subfield = 'a')
+  GROUP BY 1,2,3,4,5;
+
+-- Update reporter.materialized_simple_record with new 264-based values for publisher and pubdate
+DELETE FROM reporter.materialized_simple_record WHERE id IN (
+    SELECT DISTINCT record FROM metabib.full_rec WHERE tag = '264' AND subfield IN ('b', 'c')
+);
+
+INSERT INTO reporter.materialized_simple_record
+    SELECT DISTINCT rossr.* FROM reporter.old_super_simple_record rossr INNER JOIN metabib.full_rec mfr ON mfr.record = rossr.id
+        WHERE mfr.tag = '264' AND mfr.subfield IN ('b', 'c')
+;
+
+COMMIT;

-----------------------------------------------------------------------

Summary of changes:
 ...7-upgrade-db.sql => 2.2.8-2.2.9-upgrade-db.sql} |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
 copy Open-ILS/src/sql/Pg/version-upgrade/{2.3.6-2.3.7-upgrade-db.sql => 2.2.8-2.2.9-upgrade-db.sql} (96%)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list