From: Lebbeous Fogle-Weekley Date: Thu, 30 Jun 2011 19:14:36 +0000 (-0400) Subject: Fix the SVF authorsort field (metabib.record_attr->'authorsort') X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f1c1d397b5b8c2fc026ffc31520204d42dc207e9;p=evergreen%2Fpines.git Fix the SVF authorsort field (metabib.record_attr->'authorsort') It's important not to include things like $0 that we wouldn't want in there. Signed-off-by: Lebbeous Fogle-Weekley --- diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index 4c4b95ad2e..6302a8e994 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 ('0569', :eg_version); -- miker +INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0yyy', :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 279f2a402e..78ed74ca40 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -4198,7 +4198,7 @@ INSERT INTO config.record_attr_definition (name,label,fixed_field) values ('type INSERT INTO config.record_attr_definition (name,label,fixed_field) values ('item_type','Type','Type'); INSERT INTO config.record_attr_definition (name,label,phys_char_sf) values ('vr_format','Videorecording format',72); INSERT INTO config.record_attr_definition (name,label,sorter,filter,tag) values ('titlesort','Title',TRUE,FALSE,'tnf'); -INSERT INTO config.record_attr_definition (name,label,sorter,filter,tag) values ('authorsort','Author',TRUE,FALSE,'1%'); +INSERT INTO config.record_attr_definition (name,label,sorter,filter,tag,sf_list) values ('authorsort','Author',TRUE,FALSE,'1%','abcdefgklmnopqrstvxyz'); -- TO-DO: Auto-generate these values from CLDR -- XXX These are the values used in MARC records ... does that match CLDR, including deprecated languages? diff --git a/Open-ILS/src/sql/Pg/upgrade/0yyy.schema.fix-authsort.sql b/Open-ILS/src/sql/Pg/upgrade/0yyy.schema.fix-authsort.sql new file mode 100644 index 0000000000..e62ccef45d --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0yyy.schema.fix-authsort.sql @@ -0,0 +1,14 @@ +BEGIN; + +SELECT evergreen.upgrade_deps_block_check('0yyy', :eg_version); + +-- Not everything in 1XX tags should become part of the authorsort field +-- ($0 for example). The list of subfields chosen here is a superset of all +-- the fields found in the LoC authority mappin definitions for 1XX fields. +-- Anyway, if more fields should be here, add them. + +UPDATE config.record_attr_definition + SET sf_list = 'abcdefgklmnopqrstvxyz' + WHERE name='authorsort' AND sf_list IS NULL; + +COMMIT;