From: Mike Rylander Date: Wed, 11 May 2011 21:06:45 +0000 (-0400) Subject: Adding tables for browse axis mapping X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=9d7b84ab763b3c889220d4a099ee8b49dc86d1b2;p=working%2FEvergreen.git Adding tables for browse axis mapping --- diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index 7e032c123a..13c18aed43 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -1846,6 +1846,48 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Open-ILS/src/sql/Pg/011.schema.authority.sql b/Open-ILS/src/sql/Pg/011.schema.authority.sql index 9d595fc396..c67b15d09b 100644 --- a/Open-ILS/src/sql/Pg/011.schema.authority.sql +++ b/Open-ILS/src/sql/Pg/011.schema.authority.sql @@ -51,6 +51,18 @@ CREATE TABLE authority.thesaurus ( description TEXT -- i18n ); +CREATE TABLE authority.browse_axis ( + code TEXT PRIMARY KEY, + name TEXT UNIQUE NOT NULL, -- i18n + description TEXT +); + +CREATE TABLE authority.browse_axis_authority_field_map ( + id SERIAL PRIMARY KEY, + axis TEXT NOT NULL REFERENCES authority.browse_axis (code) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, + field INT NOT NULL REFERENCES authority.control_set_authority_field (id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED +); + CREATE TABLE authority.record_entry ( id BIGSERIAL PRIMARY KEY, create_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), 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 6100def5ad..fb96efbe67 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -9465,6 +9465,22 @@ INSERT INTO authority.control_set_authority_field (id, control_set, main_entry, (71, 1, 11, '485', 'ivwxyz4', oils_i18n_gettext('71','See Also Tracing -- Form Subdivision','acsaf','name')), (72, 1, 12, '448', 'aivwxyz4', oils_i18n_gettext('72','See Also Tracing -- Chronological Term','acsaf','name')); +INSERT INTO authority.browse_axis (code,name,description) VALUES + ('title','Title','Title axis'), + ('author','Author','Author axis'), + ('subject','Subject','Subject axis'), + ('topic','Topic','Topic Subject axis'); + +INSERT INTO authority.browse_axis_authority_field_map (axis,field) VALUES + ('author', 1 ), + ('author', 2 ), + ('author', 3 ), + ('title', 4 ), + ('topic', 5 ), + ('subject', 5 ), + ('subject', 6 ), + ('subject', 7 ), + ('subject', 12); INSERT INTO authority.control_set_bib_field (tag, authority_field) VALUES SELECT '100', id FROM authority.control_set_authority_field WHERE tag IN ('100')