[open-ils-commits] [GIT] Evergreen ILS branch rel_2_1 updated. d6c2f5a2abff72b95111f30cf4696926cd663974

Evergreen Git git at git.evergreen-ils.org
Fri Aug 12 21:17:44 EDT 2011


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_1 has been updated
       via  d6c2f5a2abff72b95111f30cf4696926cd663974 (commit)
       via  dbbb7f3e6520e61886f97c33f9ed3728d7c43c46 (commit)
      from  4b83cfb75263b39e734eac1533d967a5d1b36837 (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 d6c2f5a2abff72b95111f30cf4696926cd663974
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri Aug 12 21:13:20 2011 -0400

    Stamped upgrade script for "lp 823496: do not fail to index personal names that have relators"
    
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index 9a5f74a..251e9e4 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -57,7 +57,7 @@ CREATE TABLE config.upgrade_log (
     install_date    TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
 );
 
-INSERT INTO config.upgrade_log (version) VALUES ('0592'); -- mrpeters-isl/miker
+INSERT INTO config.upgrade_log (version) VALUES ('0599'); -- miker/gmc
 
 CREATE TABLE config.bib_source (
 	id		SERIAL	PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.fix_author_other_index.sql b/Open-ILS/src/sql/Pg/upgrade/0599.data.fix_author_other_index.sql
similarity index 91%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.fix_author_other_index.sql
rename to Open-ILS/src/sql/Pg/upgrade/0599.data.fix_author_other_index.sql
index 41d65f8..6089ef3 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.fix_author_other_index.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/0599.data.fix_author_other_index.sql
@@ -6,7 +6,7 @@
 BEGIN;
 
 -- check whether patch can be applied
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+INSERT INTO config.upgrade_log (version) VALUES ('0599'); -- miker/gmc
 
 UPDATE config.metabib_field 
 SET xpath = $$//mods32:mods/mods32:name[@type='personal' and not(mods32:role/mods32:roleTerm[text()='creator'])]$$

commit dbbb7f3e6520e61886f97c33f9ed3728d7c43c46
Author: Galen Charlton <gmc at esilibrary.com>
Date:   Tue Aug 9 15:30:56 2011 -0400

    lp 823496: don't fail to index personal names that have relators
    
    The default definition for the author|other index inadvertantly
    excluded names from 600, 700, 720, and 800 fields that have
    relator values ($e) or codes ($4).
    
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
index 8bd4112..f41f7e6 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -56,7 +56,7 @@ INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath,
 INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, facet_xpath, facet_field ) VALUES 
     (9, 'author', 'conference', oils_i18n_gettext(9, 'Conference Author', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:name[@type='conference' and mods32:role/mods32:roleTerm[text()='creator']]$$, $$//*[local-name()='namePart']$$, TRUE ); -- /* to fool vim */;
 INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, facet_xpath, facet_field ) VALUES 
-    (10, 'author', 'other', oils_i18n_gettext(10, 'Other Author', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:name[@type='personal' and not(mods32:role)]$$, $$//*[local-name()='namePart']$$, TRUE ); -- /* to fool vim */;
+    (10, 'author', 'other', oils_i18n_gettext(10, 'Other Author', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:name[@type='personal' and not(mods32:role/mods32:roleTerm[text()='creator'])]$$, $$//*[local-name()='namePart']$$, TRUE ); -- /* to fool vim */;
 
 INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, facet_field ) VALUES 
     (11, 'subject', 'geographic', oils_i18n_gettext(11, 'Geographic Subject', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:subject/mods32:geographic$$, TRUE );
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.fix_author_other_index.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.fix_author_other_index.sql
new file mode 100644
index 0000000..41d65f8
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.fix_author_other_index.sql
@@ -0,0 +1,28 @@
+-- Evergreen DB patch XXXX.fix_author_other_index.sql
+--
+-- Fix author|other index so that it doesn't exclude 700
+-- fields that contain relator values in the $e or $4.
+--
+BEGIN;
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+UPDATE config.metabib_field 
+SET xpath = $$//mods32:mods/mods32:name[@type='personal' and not(mods32:role/mods32:roleTerm[text()='creator'])]$$
+WHERE field_class = 'author'
+AND name = 'other'
+AND xpath = $$//mods32:mods/mods32:name[@type='personal' and not(mods32:role)]$$
+AND format = 'mods32';
+
+-- To reindex the affected bibs, you can run something like this:
+--
+-- SELECT metabib.reingest_metabib_field_entries(record)
+-- FROM (
+--   SELECT DISTINCT record
+--   FROM metabib.real_full_rec
+--   WHERE tag IN ('600', '700', '720', '800')
+--   AND   subfield IN ('4', 'e')
+-- ) a;
+
+COMMIT;

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

Summary of changes:
 Open-ILS/src/sql/Pg/002.schema.config.sql          |    2 +-
 Open-ILS/src/sql/Pg/950.data.seed-values.sql       |    2 +-
 .../upgrade/0599.data.fix_author_other_index.sql   |   28 ++++++++++++++++++++
 3 files changed, 30 insertions(+), 2 deletions(-)
 create mode 100644 Open-ILS/src/sql/Pg/upgrade/0599.data.fix_author_other_index.sql


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list