From: miker Date: Fri, 18 Jun 2010 16:10:59 +0000 (+0000) Subject: add serial.subscription.owning_lib X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=6c6cafbd9ad9758bcd2d57724e135cd7bc28e134;p=contrib%2FConifer.git add serial.subscription.owning_lib git-svn-id: svn://svn.open-ils.org/ILS/trunk@16760 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index 6989048bb6..f0df743c03 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 f1121d4c32..ae406a2afe 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 c320491244..5e31660638 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 0000000000..cc9a2b2e57 --- /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; +