[open-ils-commits] r17120 - in trunk/Open-ILS/src/sql/Pg: . upgrade (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Aug 6 14:12:18 EDT 2010
Author: miker
Date: 2010-08-06 14:12:14 -0400 (Fri, 06 Aug 2010)
New Revision: 17120
Added:
trunk/Open-ILS/src/sql/Pg/upgrade/0363.data.index-tcn-and-bibid.sql
Modified:
trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
Log:
Index the internal bib id and tcn value to make searching simpler
Modified: trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2010-08-06 17:53:33 UTC (rev 17119)
+++ trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2010-08-06 18:12:14 UTC (rev 17120)
@@ -68,7 +68,7 @@
install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
-INSERT INTO config.upgrade_log (version) VALUES ('0362'); -- phasefx
+INSERT INTO config.upgrade_log (version) VALUES ('0363'); -- miker
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
Modified: trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql 2010-08-06 17:53:33 UTC (rev 17119)
+++ trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql 2010-08-06 18:12:14 UTC (rev 17120)
@@ -82,6 +82,10 @@
(24, 'identifier', 'sici', oils_i18n_gettext(24, 'SICI', 'cmf', 'label'), 'marcxml', $$//marc:datafield[@tag='024' and ind1='4']/marc:subfield[@code='a' or @code='z']$$ );
INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath ) VALUES
(25, 'identifier', 'bibcn', oils_i18n_gettext(25, 'Local Free-Text Call Number', 'cmf', 'label'), 'marcxml', $$//marc:datafield[@tag='099']//text()$$ );
+INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath ) VALUES
+ (26, 'identifier', 'tcn', oils_i18n_gettext(26, 'Title Control Number', 'cmf', 'label'), 'marcxml', $$//marc:datafield[@tag='901']/marc:subfield[@code='a']$$ );
+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']$$ );
SELECT SETVAL('config.metabib_field_id_seq'::TEXT, (SELECT MAX(id) FROM config.metabib_field), TRUE);
@@ -99,6 +103,8 @@
INSERT INTO config.metabib_search_alias (alias,field_class,field) VALUES ('eg.issn','identifier', 19);
INSERT INTO config.metabib_search_alias (alias,field_class,field) VALUES ('eg.upc','identifier', 20);
INSERT INTO config.metabib_search_alias (alias,field_class,field) VALUES ('eg.callnumber','identifier', 25);
+INSERT INTO config.metabib_search_alias (alias,field_class,field) VALUES ('eg.tcn','identifier', 26);
+INSERT INTO config.metabib_search_alias (alias,field_class,field) VALUES ('eg.bibid','identifier', 27);
INSERT INTO config.metabib_search_alias (alias,field_class) VALUES ('au','author');
INSERT INTO config.metabib_search_alias (alias,field_class) VALUES ('name','author');
Added: trunk/Open-ILS/src/sql/Pg/upgrade/0363.data.index-tcn-and-bibid.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/upgrade/0363.data.index-tcn-and-bibid.sql (rev 0)
+++ trunk/Open-ILS/src/sql/Pg/upgrade/0363.data.index-tcn-and-bibid.sql 2010-08-06 18:12:14 UTC (rev 17120)
@@ -0,0 +1,13 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0363'); -- miker
+
+INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath ) VALUES
+ (26, 'identifier', 'tcn', oils_i18n_gettext(26, 'Title Control Number', 'cmf', 'label'), 'marcxml', $$//marc:datafield[@tag='901']/marc:subfield[@code='a']$$ );
+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_search_alias (alias,field_class,field) VALUES ('eg.tcn','identifier', 26);
+INSERT INTO config.metabib_search_alias (alias,field_class,field) VALUES ('eg.bibid','identifier', 27);
+
+COMMIT;
+
More information about the open-ils-commits
mailing list