[open-ils-commits] [GIT] Evergreen ILS branch rel_2_1 updated. 6e832380b0d106ee6ab54b92b2819da8c8bf81cd
Evergreen Git
git at git.evergreen-ils.org
Mon Mar 26 11:03:10 EDT 2012
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 6e832380b0d106ee6ab54b92b2819da8c8bf81cd (commit)
from bb6f48d88c57c67bb33b4975c63aacead8b11cf2 (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 6e832380b0d106ee6ab54b92b2819da8c8bf81cd
Author: Mike Rylander <mrylander at gmail.com>
Date: Mon Mar 26 11:09:14 2012 -0400
Add ISSN fix to the version upgrade script
Signed-off-by: Mike Rylander <mrylander at gmail.com>
diff --git a/Open-ILS/src/sql/Pg/version-upgrade/2.1.1-2.1.2-upgrade-db.sql b/Open-ILS/src/sql/Pg/version-upgrade/2.1.1-2.1.2-upgrade-db.sql
index 70777a1..6c891d6 100644
--- a/Open-ILS/src/sql/Pg/version-upgrade/2.1.1-2.1.2-upgrade-db.sql
+++ b/Open-ILS/src/sql/Pg/version-upgrade/2.1.1-2.1.2-upgrade-db.sql
@@ -116,3 +116,27 @@ BEGIN
END;
$func$ LANGUAGE PLPGSQL;
+INSERT INTO config.upgrade_log (version) VALUES ('0693');
+
+-- Delete the index normalizer that was meant to remove spaces from ISSNs
+-- but ended up breaking records with multiple ISSNs
+DELETE FROM config.metabib_field_index_norm_map WHERE id IN (
+ SELECT map.id FROM config.metabib_field_index_norm_map map
+ INNER JOIN config.metabib_field cmf ON cmf.id = map.field
+ INNER JOIN config.index_normalizer cin ON cin.id = map.norm
+ WHERE cin.func = 'replace'
+ AND cmf.field_class = 'identifier'
+ AND cmf.name = 'issn'
+ AND map.params = $$[" ",""]$$
+);
+
+-- Reindex records that have more than just a single ISSN
+-- to ensure that spaces are maintained
+SELECT metabib.reingest_metabib_field_entries(source)
+ FROM metabib.identifier_field_entry mife
+ INNER JOIN config.metabib_field cmf ON cmf.id = mife.field
+ WHERE cmf.field_class = 'identifier'
+ AND cmf.name = 'issn'
+ AND char_length(value) > 9
+;
+
-----------------------------------------------------------------------
Summary of changes:
.../Pg/version-upgrade/2.1.1-2.1.2-upgrade-db.sql | 24 ++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list