From: Galen Charlton Date: Wed, 10 Mar 2021 21:26:56 +0000 (-0500) Subject: LP#1917826: stamp schema update X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d57d75242f4d16be1fc5394d72826b0465ed429d;p=evergreen%2Fpines.git LP#1917826: stamp schema update 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 1581e3e80b..326fc4f62c 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -92,7 +92,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 ('1251', :eg_version); -- khuckins/Dyrcona/gmcharlt +INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1252', :eg_version); -- sandbergja/rhamby/gmcharlt CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/upgrade/1252.data.all_video_search_format.sql b/Open-ILS/src/sql/Pg/upgrade/1252.data.all_video_search_format.sql new file mode 100644 index 0000000000..a4fd37e04f --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/1252.data.all_video_search_format.sql @@ -0,0 +1,33 @@ +BEGIN; + +SELECT evergreen.upgrade_deps_block_check('1252', :eg_version); + +INSERT INTO config.coded_value_map + (id, ctype, code, opac_visible, value, search_label) + SELECT 1738,'search_format','video', true, + oils_i18n_gettext(1738, 'All Videos', 'ccvm', 'value'), + oils_i18n_gettext(1738, 'All Videos', 'ccvm', 'search_label') + WHERE NOT EXISTS ( + SELECT 1 FROM config.coded_value_map WHERE id=1738 + OR value = 'All Videos' OR search_label = 'All Videos' + ); + +INSERT INTO config.composite_attr_entry_definition (coded_value, definition) + SELECT 1738, '{"_attr":"item_type","_val":"g"}' +WHERE NOT EXISTS ( + SELECT 1 FROM config.composite_attr_entry_definition WHERE coded_value = 1738 +); + +COMMIT; + +\qecho +\qecho This is a partial record attribute reingest of your bib records. +\qecho 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. +SELECT COUNT(metabib.reingest_record_attributes(bre.id)) + FROM biblio.record_entry bre + JOIN metabib.record_attr_flat mraf ON (bre.id = mraf.id) + WHERE deleted IS FALSE + AND attr = 'item_type' + AND value = 'g'; diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.all_video_search_format.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.all_video_search_format.sql deleted file mode 100644 index cfb144f21d..0000000000 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.all_video_search_format.sql +++ /dev/null @@ -1,33 +0,0 @@ -BEGIN; - --- SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version); - -INSERT INTO config.coded_value_map - (id, ctype, code, opac_visible, value, search_label) - SELECT 1738,'search_format','video', true, - oils_i18n_gettext(1738, 'All Videos', 'ccvm', 'value'), - oils_i18n_gettext(1738, 'All Videos', 'ccvm', 'search_label') - WHERE NOT EXISTS ( - SELECT 1 FROM config.coded_value_map WHERE id=1738 - OR value = 'All Videos' OR search_label = 'All Videos' - ); - -INSERT INTO config.composite_attr_entry_definition (coded_value, definition) - SELECT 1738, '{"_attr":"item_type","_val":"g"}' -WHERE NOT EXISTS ( - SELECT 1 FROM config.composite_attr_entry_definition WHERE coded_value = 1738 -); - -COMMIT; - -\qecho -\qecho This is a partial record attribute reingest of your bib records. -\qecho 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. -SELECT COUNT(metabib.reingest_record_attributes(bre.id)) - FROM biblio.record_entry bre - JOIN metabib.record_attr_flat mraf ON (bre.id = mraf.id) - WHERE deleted IS FALSE - AND attr = 'item_type' - AND value = 'g';