[open-ils-commits] r15980 - 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
Thu Mar 25 14:08:00 EDT 2010
Author: scottmk
Date: 2010-03-25 14:07:56 -0400 (Thu, 25 Mar 2010)
New Revision: 15980
Added:
trunk/Open-ILS/src/sql/Pg/upgrade/0214.schema.acq.replace-claim-interval.sql
Modified:
trunk/Open-ILS/examples/fm_IDL.xml
trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
Log:
Replace claim_interval column with claim_policy column, a foreign key
pointing to acq.claim_policy.
(...thus bringing the history table back into sync with its source table.)
M Open-ILS/src/sql/Pg/002.schema.config.sql
A Open-ILS/src/sql/Pg/upgrade/0214.schema.acq.replace-claim-interval.sql
M Open-ILS/examples/fm_IDL.xml
Modified: trunk/Open-ILS/examples/fm_IDL.xml
===================================================================
--- trunk/Open-ILS/examples/fm_IDL.xml 2010-03-25 17:24:02 UTC (rev 15979)
+++ trunk/Open-ILS/examples/fm_IDL.xml 2010-03-25 18:07:56 UTC (rev 15980)
@@ -5307,7 +5307,7 @@
<field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
<field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
<field reporter:label="State" name="state" reporter:datatype="text"/>
- <field reporter:label="Claim Interval" name="claim_interval" reporter:datatype="interval"/>
+ <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
<field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
<field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
</fields>
@@ -5321,6 +5321,7 @@
<link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
<link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
<link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
+ <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
</links>
<permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
<retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
Modified: trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2010-03-25 17:24:02 UTC (rev 15979)
+++ trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2010-03-25 18:07:56 UTC (rev 15980)
@@ -59,7 +59,7 @@
install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
-INSERT INTO config.upgrade_log (version) VALUES ('0213'); -- miker
+INSERT INTO config.upgrade_log (version) VALUES ('0214'); -- Scott McKellar
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
Added: trunk/Open-ILS/src/sql/Pg/upgrade/0214.schema.acq.replace-claim-interval.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/upgrade/0214.schema.acq.replace-claim-interval.sql (rev 0)
+++ trunk/Open-ILS/src/sql/Pg/upgrade/0214.schema.acq.replace-claim-interval.sql 2010-03-25 18:07:56 UTC (rev 15980)
@@ -0,0 +1,13 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0214'); -- Scott McKellar
+
+ALTER TABLE acq.acq_lineitem_history
+ DROP COLUMN claim_interval;
+
+ALTER TABLE acq.acq_lineitem_history
+ ADD COLUMN claim_policy INT
+ REFERENCES acq.claim_policy
+ DEFERRABLE INITIALLY DEFERRED;
+
+COMMIT;
More information about the open-ils-commits
mailing list