[open-ils-commits] r14745 - in trunk/Open-ILS: examples src/sql/Pg src/sql/Pg/upgrade (scottmk)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Nov 3 13:50:44 EST 2009
Author: scottmk
Date: 2009-11-03 13:50:40 -0500 (Tue, 03 Nov 2009)
New Revision: 14745
Added:
trunk/Open-ILS/src/sql/Pg/upgrade/0069.schema.atc-prev-dest.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/090.schema.action.sql
Log:
Add column prev_dest to action.transit_copy and
action.hold_transit_copy.
M Open-ILS/src/sql/Pg/090.schema.action.sql
M Open-ILS/src/sql/Pg/002.schema.config.sql
A Open-ILS/src/sql/Pg/upgrade/0069.schema.atc-prev-dest.sql
M Open-ILS/examples/fm_IDL.xml
Modified: trunk/Open-ILS/examples/fm_IDL.xml
===================================================================
--- trunk/Open-ILS/examples/fm_IDL.xml 2009-11-03 18:26:05 UTC (rev 14744)
+++ trunk/Open-ILS/examples/fm_IDL.xml 2009-11-03 18:50:40 UTC (rev 14745)
@@ -1159,6 +1159,7 @@
<field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
<field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
<field reporter:label="Source" name="source" reporter:datatype="link"/>
+ <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
<field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
<field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
<field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
@@ -1166,6 +1167,7 @@
<links>
<link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
<link field="source" reltype="has_a" key="id" map="" class="aou"/>
+ <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
<link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
<link field="dest" reltype="has_a" key="id" map="" class="aou"/>
<link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
@@ -2816,6 +2818,7 @@
<field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
<field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
<field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
+ <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
</fields>
<links>
<link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
@@ -2836,6 +2839,7 @@
<link field="distribution_formula_entries" reltype="has_many" key="owning_lib" map="" class="acqdfe"/>
<link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
<link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
+ <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
</links>
<permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
<actions>
@@ -3774,6 +3778,7 @@
<field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
<field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
<field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
+ <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
</fields>
<links>
<link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
@@ -3781,6 +3786,7 @@
<link field="source" reltype="has_a" key="id" map="" class="aou"/>
<link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
<link field="dest" reltype="has_a" key="id" map="" class="aou"/>
+ <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
<link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
</links>
<permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
Modified: trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2009-11-03 18:26:05 UTC (rev 14744)
+++ trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2009-11-03 18:50:40 UTC (rev 14745)
@@ -51,7 +51,7 @@
install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
-INSERT INTO config.upgrade_log (version) VALUES ('0068'); -- miker
+INSERT INTO config.upgrade_log (version) VALUES ('0069'); -- Scott McKellar
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
Modified: trunk/Open-ILS/src/sql/Pg/090.schema.action.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/090.schema.action.sql 2009-11-03 18:26:05 UTC (rev 14744)
+++ trunk/Open-ILS/src/sql/Pg/090.schema.action.sql 2009-11-03 18:50:40 UTC (rev 14745)
@@ -414,7 +414,8 @@
dest INT NOT NULL REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED,
prev_hop INT REFERENCES action.transit_copy (id) DEFERRABLE INITIALLY DEFERRED,
copy_status INT NOT NULL REFERENCES config.copy_status (id) DEFERRABLE INITIALLY DEFERRED,
- persistant_transfer BOOL NOT NULL DEFAULT FALSE
+ persistant_transfer BOOL NOT NULL DEFAULT FALSE,
+ prev_dest INT NOT NULL REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED
);
CREATE INDEX active_transit_dest_idx ON "action".transit_copy (dest);
CREATE INDEX active_transit_source_idx ON "action".transit_copy (source);
Added: trunk/Open-ILS/src/sql/Pg/upgrade/0069.schema.atc-prev-dest.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/upgrade/0069.schema.atc-prev-dest.sql (rev 0)
+++ trunk/Open-ILS/src/sql/Pg/upgrade/0069.schema.atc-prev-dest.sql 2009-11-03 18:50:40 UTC (rev 14745)
@@ -0,0 +1,9 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0069');
+
+ALTER TABLE action.transit_copy
+ADD COLUMN prev_dest INTEGER REFERENCES actor.org_unit( id )
+ DEFERRABLE INITIALLY DEFERRED;
+
+COMMIT;
More information about the open-ils-commits
mailing list