From 6c6cafbd9ad9758bcd2d57724e135cd7bc28e134 Mon Sep 17 00:00:00 2001 From: miker Date: Fri, 18 Jun 2010 16:10:59 +0000 Subject: [PATCH] add serial.subscription.owning_lib git-svn-id: svn://svn.open-ils.org/ILS/trunk@16760 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/examples/fm_IDL.xml | 2 ++ Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +- Open-ILS/src/sql/Pg/210.schema.serials.sql | 1 + Open-ILS/src/sql/Pg/upgrade/0313.schema.subscription-owner.sql | 10 ++++++++++ 4 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 Open-ILS/src/sql/Pg/upgrade/0313.schema.subscription-owner.sql diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index 6989048bb..f0df743c0 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -3043,12 +3043,14 @@ 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 f1121d4c3..ae406a2af 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -68,7 +68,7 @@ CREATE TABLE config.upgrade_log ( install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW() ); -INSERT INTO config.upgrade_log (version) VALUES ('0312'); -- atz +INSERT INTO config.upgrade_log (version) VALUES ('0313'); -- miker CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/210.schema.serials.sql b/Open-ILS/src/sql/Pg/210.schema.serials.sql index c32049124..5e3166063 100644 --- a/Open-ILS/src/sql/Pg/210.schema.serials.sql +++ b/Open-ILS/src/sql/Pg/210.schema.serials.sql @@ -28,6 +28,7 @@ CREATE RULE protect_mfhd_delete AS ON DELETE TO serial.record_entry DO INSTEAD U CREATE TABLE serial.subscription ( id SERIAL PRIMARY KEY, + owning_lib INT NOT NULL DEFAULT 1 REFERENCES actor.org_unit (id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED, start_date TIMESTAMP WITH TIME ZONE NOT NULL, end_date TIMESTAMP WITH TIME ZONE, -- interpret NULL as current subscription record_entry BIGINT REFERENCES biblio.record_entry (id) diff --git a/Open-ILS/src/sql/Pg/upgrade/0313.schema.subscription-owner.sql b/Open-ILS/src/sql/Pg/upgrade/0313.schema.subscription-owner.sql new file mode 100644 index 000000000..cc9a2b2e5 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0313.schema.subscription-owner.sql @@ -0,0 +1,10 @@ +BEGIN; + +-- Org Unit Settings for configuring org unit weights and org unit max-loops for hold targeting + +INSERT INTO config.upgrade_log (version) VALUES ('0313'); --miker + +ALTER TABLE serial.subscription ADD COLUMN owning_lib INT NOT NULL DEFAULT 1 REFERENCES actor.org_unit (id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED; + +COMMIT; + -- 2.11.0