[open-ils-commits] [GIT] Evergreen ILS branch master updated. 4d636e544449f8e67fe38552d74e96b12aff6201

Evergreen Git git at git.evergreen-ils.org
Fri Apr 21 09:06:07 EDT 2017


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, master has been updated
       via  4d636e544449f8e67fe38552d74e96b12aff6201 (commit)
      from  d3e591df6f6df9b2eb975ed8d4a63aaf9d3e5146 (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 4d636e544449f8e67fe38552d74e96b12aff6201
Author: Galen Charlton <gmc at equinoxinitiative.org>
Date:   Fri Apr 21 09:12:54 2017 -0400

    forward-port 2.12.0-2.12.1 database update
    
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>

diff --git a/Open-ILS/src/sql/Pg/version-upgrade/2.12.0-2.12.1-upgrade-db.sql b/Open-ILS/src/sql/Pg/version-upgrade/2.12.0-2.12.1-upgrade-db.sql
new file mode 100644
index 0000000..07753a2
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/version-upgrade/2.12.0-2.12.1-upgrade-db.sql
@@ -0,0 +1,78 @@
+--Upgrade Script for 2.12.0 to 2.12.1
+\set eg_version '''2.12.1'''
+BEGIN;
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('2.12.1', :eg_version);
+
+SELECT evergreen.upgrade_deps_block_check('1033', :eg_version);
+
+-- correctly turn off browsing for subjectd|geograhic and
+-- subject|temporal now that the *_browse versions exist. This is
+-- a no-op in a database that was started at version 2.12.0.
+UPDATE config.metabib_field
+SET browse_field = FALSE
+WHERE field_class = 'subject' AND name = 'geographic'
+AND browse_field
+AND id = 11;
+UPDATE config.metabib_field
+SET browse_field = FALSE
+WHERE field_class = 'subject' AND name = 'temporal'
+AND browse_field
+AND id = 13;
+
+select b.tag, idx.name
+from authority.control_set_bib_field b
+join authority.control_set_bib_field_metabib_field_map map on (b.id = map.bib_field)
+join config.metabib_field idx on (map.metabib_field = idx.id)
+order by b.tag;
+
+-- and fix bib field mapping if necessasry
+UPDATE authority.control_set_bib_field_metabib_field_map map
+SET metabib_field = cmf.id
+FROM config.metabib_field cmf
+WHERE cmf.field_class = 'subject' AND cmf.name= 'temporal_browse'
+AND   map.bib_field IN (
+    SELECT b.id
+    FROM authority.control_set_bib_field b
+    JOIN authority.control_set_authority_field a
+    ON (b.authority_field = a.id)
+    AND a.tag = '148'
+)
+AND   map.metabib_field IN (
+    SELECT id
+    FROM config.metabib_field
+    WHERE field_class = 'subject' AND name = 'geographic_browse'
+);
+UPDATE authority.control_set_bib_field_metabib_field_map map
+SET metabib_field = cmf.id
+FROM config.metabib_field cmf
+WHERE cmf.field_class = 'subject' AND cmf.name= 'geographic_browse'
+AND   map.bib_field IN (
+    SELECT b.id
+    FROM authority.control_set_bib_field b
+    JOIN authority.control_set_authority_field a
+    ON (b.authority_field = a.id)
+    AND a.tag = '151'
+)
+AND   map.metabib_field IN (
+    SELECT id
+    FROM config.metabib_field
+    WHERE field_class = 'subject' AND name = 'temporal_browse'
+);
+COMMIT;
+
+\qecho Verify that bib subject fields appear to be mapped to
+\qecho to correct browse indexes
+SELECT b.id, b.tag, idx.field_class, idx.name
+FROM authority.control_set_bib_field b
+JOIN authority.control_set_bib_field_metabib_field_map map ON (b.id = map.bib_field)
+JOIN config.metabib_field idx ON (map.metabib_field = idx.id)
+WHERE tag ~ '^6'
+ORDER BY b.tag;
+
+
+\qecho This is a browse-only reingest of your bib records. It may take a while.
+\qecho You may cancel now without losing the effect of the rest of the
+\qecho upgrade script, and arrange the reingest later.
+\qecho .
+SELECT metabib.reingest_metabib_field_entries(id, TRUE, FALSE, TRUE)
+    FROM biblio.record_entry;

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

Summary of changes:
 .../2.12.0-2.12.1-upgrade-db.sql}                  |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
 copy Open-ILS/src/sql/Pg/{upgrade/1033.data.fix_subject_browse_mappings.sql => version-upgrade/2.12.0-2.12.1-upgrade-db.sql} (94%)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list