From 3a5794dabed7af3d7aad485d8abb824acac8de0f Mon Sep 17 00:00:00 2001 From: erickson Date: Thu, 13 Nov 2008 19:19:21 +0000 Subject: [PATCH] added in-db billing types tables and IDL bits. this will replace the config in opensrf.xml git-svn-id: svn://svn.open-ils.org/ILS/trunk@11166 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/examples/fm_IDL.xml | 23 ++++++++++++++++++++++- Open-ILS/src/sql/Pg/002.schema.config.sql | 9 +++++++++ Open-ILS/src/sql/Pg/800.fkeys.sql | 2 ++ 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index ae8ddd4dfa..81b666bc2d 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -3432,7 +3432,28 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - + + + + + + + + + + + + + + + + + + + + + + diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index 5fb1aa03f3..f140b20e6f 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -488,5 +488,14 @@ CREATE TABLE config.i18n_core ( CREATE UNIQUE INDEX i18n_identity ON config.i18n_core (fq_field,identity_value,translation); +CREATE TABLE config.billing_type ( + id SERIAL PRIMARY KEY, + name TEXT NOT NULL, + owner INT NOT NULL, -- REFERENCES actor.org_unit (id) + default_price NUMERIC(6,2), + CONSTRAINT billing_type_once_per_lib UNIQUE (name, owner) +); + + COMMIT; diff --git a/Open-ILS/src/sql/Pg/800.fkeys.sql b/Open-ILS/src/sql/Pg/800.fkeys.sql index baa918589f..7faa1ee36e 100644 --- a/Open-ILS/src/sql/Pg/800.fkeys.sql +++ b/Open-ILS/src/sql/Pg/800.fkeys.sql @@ -95,4 +95,6 @@ ALTER TABLE action.circulation ADD CONSTRAINT action_circulation_usr_fkey FOREIG ALTER TABLE action.circulation ADD CONSTRAINT action_circulation_circ_lib_fkey FOREIGN KEY (circ_lib) REFERENCES actor.org_unit (id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED; ALTER TABLE action.circulation ADD CONSTRAINT action_circulation_target_copy_fkey FOREIGN KEY (target_copy) REFERENCES asset.copy (id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE config.billing_type ADD CONSTRAINT config_billing_type_owner_fkey FOREIGN KEY (owner) REFERENCES actor.org_unit (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; + COMMIT; -- 2.11.0