From: Galen Charlton Date: Wed, 17 Feb 2016 16:11:01 +0000 (-0500) Subject: LP#1067823: stamp upgrade script X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=652ead4a4447376d49d37108f443f4f649071039;p=evergreen%2Fpines.git LP#1067823: stamp upgrade script Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index 2191024ff3..f5acbefd41 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -91,7 +91,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 ('0951', :eg_version); -- dyrcona/kmlussier +INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0952', :eg_version); --miker/kmlussier/gmcharlt CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/upgrade/0952.data.genre-indexing.sql b/Open-ILS/src/sql/Pg/upgrade/0952.data.genre-indexing.sql new file mode 100644 index 0000000000..92ec068771 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0952.data.genre-indexing.sql @@ -0,0 +1,26 @@ +BEGIN; + +INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0952', :eg_version); --miker/kmlussier/gmcharlt + +INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, browse_field, facet_field, facet_xpath, joiner ) VALUES + (33, 'identifier', 'genre', oils_i18n_gettext(33, 'Genre', 'cmf', 'label'), 'marcxml', $$//marc:datafield[@tag='655']$$, FALSE, TRUE, $$//*[local-name()='subfield' and contains('abvxyz',@code)]$$, ' -- ' ); -- /* to fool vim */; + +INSERT INTO config.metabib_field_index_norm_map (field,norm) + SELECT m.id, + i.id + FROM config.metabib_field m, + config.index_normalizer i + WHERE i.func IN ('search_normalize','split_date_range') + AND m.id IN (33); + +COMMIT; + +\qecho +\qecho To use the new identifier|genre index, it is necessary to do +\qecho a partial reingest. For example, +\qecho +\qecho SELECT metabib.reingest_metabib_field_entries(record, FALSE, TRUE, FALSE) +\qecho FROM metabib.real_full_rec +\qecho WHERE tag IN (''''655'''') +\qecho GROUP BY record; +\qecho diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.genre-indexing.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.genre-indexing.sql deleted file mode 100644 index 27721ee19b..0000000000 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.genre-indexing.sql +++ /dev/null @@ -1,24 +0,0 @@ -BEGIN; - -INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, browse_field, facet_field, facet_xpath, joiner ) VALUES - (33, 'identifier', 'genre', oils_i18n_gettext(33, 'Genre', 'cmf', 'label'), 'marcxml', $$//marc:datafield[@tag='655']$$, FALSE, TRUE, $$//*[local-name()='subfield' and contains('abvxyz',@code)]$$, ' -- ' ); -- /* to fool vim */; - -INSERT INTO config.metabib_field_index_norm_map (field,norm) - SELECT m.id, - i.id - FROM config.metabib_field m, - config.index_normalizer i - WHERE i.func IN ('search_normalize','split_date_range') - AND m.id IN (33); - -COMMIT; - -\qecho -\qecho To use the new identifier|genre index, it is necessary to do -\qecho a partial reingest. For example, -\qecho -\qecho SELECT metabib.reingest_metabib_field_entries(record, FALSE, TRUE, FALSE) -\qecho FROM metabib.real_full_rec -\qecho WHERE tag IN (''''655'''') -\qecho GROUP BY record; -\qecho