From 2afb4e1d1f70f43b9b57792f6321ebd2f9d5702b Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Wed, 11 May 2011 17:06:45 -0400 Subject: [PATCH] Adding tables for browse axis mapping --- Open-ILS/examples/fm_IDL.xml | 42 ++++++++++++++++++++++++++++ Open-ILS/src/sql/Pg/011.schema.authority.sql | 12 ++++++++ Open-ILS/src/sql/Pg/950.data.seed-values.sql | 16 +++++++++++ 3 files changed, 70 insertions(+) diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index 412ecded5a..8ac3e9423a 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -1721,6 +1721,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 68cb349d1a..3aac2340aa 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 3c205c1417..046e6880c3 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -8042,6 +8042,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') -- 2.11.0