From: Kathy Lussier Date: Mon, 29 Feb 2016 16:08:25 +0000 (-0500) Subject: LP#1519055: Fix to sql to get seed data values and to reingest instruction X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=53e14a671271d4656c290dcbf57851b8f10276f5;p=evergreen%2Fmasslnc.git LP#1519055: Fix to sql to get seed data values and to reingest instruction Signed-off-by: Kathy Lussier Signed-off-by: Ben Shum --- 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 9348d1ad85..e234361e8c 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -7056,7 +7056,7 @@ INSERT INTO config.coded_value_map -- Electronic search format, not opac_visible INSERT INTO config.coded_value_map - (id, ctype, code, value, opac_visible, search_label) VALUES + (id, ctype, code, opac_visible, value, search_label) VALUES (712, 'search_format', 'electronic', FALSE, oils_i18n_gettext(712, 'Electronic', 'ccvm', 'value'), oils_i18n_gettext(712, 'Electronic', 'ccvm', 'search_label')); @@ -7461,7 +7461,7 @@ INSERT INTO config.composite_attr_entry_definition -- electronic INSERT INTO config.composite_attr_entry_definition (coded_value, definition) VALUES -(712, '{"_attr":"item_form","_val":"s"},{"_attr":"item_form","_val":"o"}'); +(712, '[{"_attr":"item_form","_val":"s"},{"_attr":"item_form","_val":"o"}]'); -- use the definitions from the icon_format as the basis for the MR hold format definitions DO $$ diff --git a/Open-ILS/src/sql/Pg/upgrade/XXX.data.electronic-resources.sql b/Open-ILS/src/sql/Pg/upgrade/XXX.data.electronic-resources.sql index 1819e17175..b634c3638d 100644 --- a/Open-ILS/src/sql/Pg/upgrade/XXX.data.electronic-resources.sql +++ b/Open-ILS/src/sql/Pg/upgrade/XXX.data.electronic-resources.sql @@ -3,21 +3,31 @@ BEGIN; SELECT evergreen.upgrade_deps_block_check('XXX', :eg_version); INSERT INTO config.coded_value_map - (id, ctype, code, value, opac_visible, search_label) VALUES + (id, ctype, code, opac_visible, value, search_label) VALUES (712, 'search_format', 'electronic', FALSE, oils_i18n_gettext(712, 'Electronic', 'ccvm', 'value'), oils_i18n_gettext(712, 'Electronic', 'ccvm', 'search_label')); INSERT INTO config.composite_attr_entry_definition (coded_value, definition) VALUES -(712, '{"_attr":"item_form","_val":"s"},{"_attr":"item_form","_val":"o"}'); +(712, '[{"_attr":"item_form","_val":"s"},{"_attr":"item_form","_val":"o"}]'); COMMIT; \qecho To use the new electronic search format, it is necessary to do a -\qecho record attribute reingest. For example, +\qecho record attribute reingest. Consider generating an SQL script with +\qecho the following queries: \qecho -\qecho SELECT 'metabib.reingest_record_attributes(' || id || ');' -\qecho biblio.record_entry WHERE NOT DELETED and id > 0; +\qecho '\\t' +\qecho '\\o /tmp/partial_reingest_bib_recs.sql' +\qecho 'SELECT ''select metabib.reingest_record_attributes('' || id || '');'' FROM biblio.record_entry WHERE NOT DELETED AND id > 0;' +\qecho '\\o' +\qecho '\\t' +\qecho +\qecho +\qecho **** then running it via psql: +\qecho +\qecho +\qecho '\\i /tmp/partial_reingest_bib_recs.sql' \qecho