From 94f69d21b6759dc43c151c7796dafee74083f62c Mon Sep 17 00:00:00 2001 From: Lebbeous Fogle-Weekley Date: Thu, 28 Jul 2011 12:09:01 -0400 Subject: [PATCH] Add lccn field to the identifier search class MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Facilitates easily searching by LCCN (010 ‡a). Signed-off-by: Lebbeous Fogle-Weekley Signed-off-by: Bill Erickson --- Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +- Open-ILS/src/sql/Pg/950.data.seed-values.sql | 3 ++- .../sql/Pg/upgrade/0587.data.config.metabib_field.lccn.sql | 14 ++++++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 Open-ILS/src/sql/Pg/upgrade/0587.data.config.metabib_field.lccn.sql diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index c1849b9315..3b9d49e595 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -86,7 +86,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 ('0586', :eg_version); -- senator/berick +INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0587', :eg_version); -- senator CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, 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 95f4f34964..13070040fc 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -96,7 +96,8 @@ INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath ) INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath ) VALUES (27, 'identifier', 'bibid', oils_i18n_gettext(27, 'Internal ID', 'cmf', 'label'), 'marcxml', $$//marc:datafield[@tag='901']/marc:subfield[@code='c']$$ ); INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, search_field, facet_field) VALUES - (28, 'identifier', 'authority_id', oils_i18n_gettext(28, 'Authority Record ID', 'cmf', 'label'), 'marcxml', '//marc:datafield/marc:subfield[@code="0"]', FALSE, TRUE); + (28, 'identifier', 'authority_id', oils_i18n_gettext(28, 'Authority Record ID', 'cmf', 'label'), 'marcxml', '//marc:datafield/marc:subfield[@code="0"]', FALSE, TRUE), + (29, 'identifier', 'lccn', oils_i18n_gettext(29, 'LCCN', 'cmf', 'label'), 'marcxml', '//marc:datafield[@tag="010"]/marc:subfield[@code="a"]', TRUE, FALSE) ; SELECT SETVAL('config.metabib_field_id_seq'::TEXT, (SELECT MAX(id) FROM config.metabib_field), TRUE); diff --git a/Open-ILS/src/sql/Pg/upgrade/0587.data.config.metabib_field.lccn.sql b/Open-ILS/src/sql/Pg/upgrade/0587.data.config.metabib_field.lccn.sql new file mode 100644 index 0000000000..9db6caf09e --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0587.data.config.metabib_field.lccn.sql @@ -0,0 +1,14 @@ +BEGIN; + +SELECT evergreen.upgrade_deps_block_check('0587', :eg_version); + +INSERT INTO config.metabib_field ( + id, field_class, name, label, xpath, weight, format, + search_field, facet_field +) VALUES ( + 29, 'identifier', 'lccn', oils_i18n_gettext(29, 'LCCN', 'cmf', 'label'), + '//marc:datafield[@tag="010"]/marc:subfield[@code="a"]', 1, + 'marcxml', TRUE, FALSE +); + +COMMIT; -- 2.11.0