LP#1259665 Stamping upgrade for 800t search and facets
authorBen Shum <bshum@biblio.org>
Fri, 28 Mar 2014 20:53:39 +0000 (16:53 -0400)
committerBen Shum <bshum@biblio.org>
Fri, 28 Mar 2014 20:54:57 +0000 (16:54 -0400)
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/upgrade/0877.data.re-add_800_t_search_and_facets.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/XXXX.data.re-add_800_t_search_and_facets.sql [deleted file]

index f1bde2b..8f6de52 100644 (file)
@@ -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 ('0876', :eg_version); -- mcooper/bshum
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0877', :eg_version); -- dbwells/bshum
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/0877.data.re-add_800_t_search_and_facets.sql b/Open-ILS/src/sql/Pg/upgrade/0877.data.re-add_800_t_search_and_facets.sql
new file mode 100644 (file)
index 0000000..ddab41d
--- /dev/null
@@ -0,0 +1,25 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('0877', :eg_version);
+
+-- Don't use Series search field as the browse field
+UPDATE config.metabib_field SET
+       browse_field = FALSE,
+       browse_xpath = NULL,
+       browse_sort_xpath = NULL,
+       xpath = $$//mods32:mods/mods32:relatedItem[@type="series"]/mods32:titleInfo[not(@type="nfi")]$$
+WHERE id = 1;
+
+-- Create a new series browse config
+INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, search_field, authority_xpath, browse_field, browse_sort_xpath ) VALUES
+    (32, 'series', 'browse', oils_i18n_gettext(32, 'Series Title (Browse)', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:relatedItem[@type="series"]/mods32:titleInfo[@type="nfi"]$$, FALSE, '//@xlink:href', TRUE, $$*[local-name() != "nonSort"]$$ );
+
+COMMIT;
+
+\qecho This is a full field-entry reingest of your bib records.
+\qecho It will 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 COUNT(metabib.reingest_metabib_field_entries(id))
+    FROM biblio.record_entry WHERE deleted IS FALSE;
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.re-add_800_t_search_and_facets.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.re-add_800_t_search_and_facets.sql
deleted file mode 100644 (file)
index bef672f..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-BEGIN;
-
---SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
-
--- Don't use Series search field as the browse field
-UPDATE config.metabib_field SET
-       browse_field = FALSE,
-       browse_xpath = NULL,
-       browse_sort_xpath = NULL,
-       xpath = $$//mods32:mods/mods32:relatedItem[@type="series"]/mods32:titleInfo[not(@type="nfi")]$$
-WHERE id = 1;
-
--- Create a new series browse config
-INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, search_field, authority_xpath, browse_field, browse_sort_xpath ) VALUES
-    (32, 'series', 'browse', oils_i18n_gettext(32, 'Series Title (Browse)', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:relatedItem[@type="series"]/mods32:titleInfo[@type="nfi"]$$, FALSE, '//@xlink:href', TRUE, $$*[local-name() != "nonSort"]$$ );
-
-COMMIT;
-
-\qecho This is a full field-entry reingest of your bib records.
-\qecho It will 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 COUNT(metabib.reingest_metabib_field_entries(id))
-    FROM biblio.record_entry WHERE deleted IS FALSE;