From eb967416d26be731e20d4662de12d6e62f0be79a Mon Sep 17 00:00:00 2001 From: Michele Morgan Date: Wed, 25 May 2022 10:02:13 -0400 Subject: [PATCH] LP#1501870 - Remove invalid Z39.50 search attribute from LOC Removes the 1001 Item Type attribute from seed date for LOC. Also includes an upgrade script to remove the 1001 attribute from config.z3950_attr. Signed-off-by: Michele Morgan Signed-off-by: Garry Collum Signed-off-by: Jane Sandberg --- Open-ILS/src/sql/Pg/950.data.seed-values.sql | 2 -- .../Pg/upgrade/XXXX.schema.remove_invalid_search_attribute.sql | 9 +++++++++ 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.remove_invalid_search_attribute.sql 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 910e887a81..1ac2791ed5 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -618,8 +618,6 @@ INSERT INTO config.z3950_attr (id, source, name, label, code, format) INSERT INTO config.z3950_attr (id, source, name, label, code, format) VALUES (8, 'loc', 'pubdate', oils_i18n_gettext(8, 'Publication Date', 'cza', 'label'), 31, 1); INSERT INTO config.z3950_attr (id, source, name, label, code, format) - VALUES (9, 'loc', 'item_type', oils_i18n_gettext(9, 'Item Type', 'cza', 'label'), 1001, 1); -INSERT INTO config.z3950_attr (id, source, name, label, code, format) VALUES (19, 'loc', 'upc', oils_i18n_gettext(19, 'UPC', 'cza', 'label'), 1007, 1); UPDATE config.z3950_attr SET truncation = 1 WHERE source = 'loc'; diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.remove_invalid_search_attribute.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.remove_invalid_search_attribute.sql new file mode 100644 index 0000000000..0bb68afd28 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.remove_invalid_search_attribute.sql @@ -0,0 +1,9 @@ +-- remove invalid search attribute Item Type from LC Z39.50 target + +BEGIN; + +SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version); + +DELETE FROM config.z3950_attr WHERE source = 'loc' AND code = 1001; + +COMMIT; -- 2.11.0