[open-ils-commits] r16760 - in trunk/Open-ILS: examples src/sql/Pg src/sql/Pg/upgrade (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Jun 18 12:11:02 EDT 2010
Author: miker
Date: 2010-06-18 12:10:59 -0400 (Fri, 18 Jun 2010)
New Revision: 16760
Added:
trunk/Open-ILS/src/sql/Pg/upgrade/0313.schema.subscription-owner.sql
Modified:
trunk/Open-ILS/examples/fm_IDL.xml
trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
trunk/Open-ILS/src/sql/Pg/210.schema.serials.sql
Log:
add serial.subscription.owning_lib
Modified: trunk/Open-ILS/examples/fm_IDL.xml
===================================================================
--- trunk/Open-ILS/examples/fm_IDL.xml 2010-06-18 15:56:57 UTC (rev 16759)
+++ trunk/Open-ILS/examples/fm_IDL.xml 2010-06-18 16:10:59 UTC (rev 16760)
@@ -3043,12 +3043,14 @@
<class id="ssub" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
<fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
<field reporter:label="Id" name="id" reporter:datatype="id"/>
+ <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
<field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
<field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
<field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
<field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
</fields>
<links>
+ <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
<link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
</links>
</class>
Modified: trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2010-06-18 15:56:57 UTC (rev 16759)
+++ trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2010-06-18 16:10:59 UTC (rev 16760)
@@ -68,7 +68,7 @@
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,
Modified: trunk/Open-ILS/src/sql/Pg/210.schema.serials.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/210.schema.serials.sql 2010-06-18 15:56:57 UTC (rev 16759)
+++ trunk/Open-ILS/src/sql/Pg/210.schema.serials.sql 2010-06-18 16:10:59 UTC (rev 16760)
@@ -28,6 +28,7 @@
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)
Added: trunk/Open-ILS/src/sql/Pg/upgrade/0313.schema.subscription-owner.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/upgrade/0313.schema.subscription-owner.sql (rev 0)
+++ trunk/Open-ILS/src/sql/Pg/upgrade/0313.schema.subscription-owner.sql 2010-06-18 16:10:59 UTC (rev 16760)
@@ -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;
+
More information about the open-ils-commits
mailing list