[open-ils-commits] r15705 - 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 4 17:11:35 EST 2010
Author: scottmk
Date: 2010-03-04 17:11:29 -0500 (Thu, 04 Mar 2010)
New Revision: 15705
Added:
trunk/Open-ILS/src/sql/Pg/upgrade/0178.schema.acq.lid-cancel-reason.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/200.schema.acq.sql
Log:
Add a cancel_reason column to acq.lineitem_detail, pointing to
acq.cancel_reason. See KCLS ticket #3015.
M Open-ILS/src/sql/Pg/200.schema.acq.sql
M Open-ILS/src/sql/Pg/002.schema.config.sql
A Open-ILS/src/sql/Pg/upgrade/0178.schema.acq.lid-cancel-reason.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-04 21:31:55 UTC (rev 15704)
+++ trunk/Open-ILS/examples/fm_IDL.xml 2010-03-04 22:11:29 UTC (rev 15705)
@@ -5335,6 +5335,7 @@
<field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
<field reporter:label="Note" name="note" reporter:datatype="text" />
<field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
+ <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
</fields>
<links>
<link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
@@ -5344,6 +5345,7 @@
<link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
<link field="location" reltype="has_a" key="id" map="" class="acpl"/>
<link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
+ <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
</links>
</class>
Modified: trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2010-03-04 21:31:55 UTC (rev 15704)
+++ trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2010-03-04 22:11:29 UTC (rev 15705)
@@ -51,7 +51,7 @@
install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
-INSERT INTO config.upgrade_log (version) VALUES ('0177'); -- Scott McKellar
+INSERT INTO config.upgrade_log (version) VALUES ('0178'); -- Scott McKellar
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
Modified: trunk/Open-ILS/src/sql/Pg/200.schema.acq.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/200.schema.acq.sql 2010-03-04 21:31:55 UTC (rev 15704)
+++ trunk/Open-ILS/src/sql/Pg/200.schema.acq.sql 2010-03-04 22:11:29 UTC (rev 15705)
@@ -500,7 +500,8 @@
circ_modifier TEXT REFERENCES config.circ_modifier (code) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED,
owning_lib INT REFERENCES actor.org_unit (id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED,
location INT REFERENCES asset.copy_location (id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED,
- recv_time TIMESTAMP WITH TIME ZONE
+ recv_time TIMESTAMP WITH TIME ZONE,
+ cancel_reason INT REFERENCES acq.cancel_reason( id ) DEFERRABLE INITIALLY DEFERRED
);
CREATE INDEX li_detail_li_idx ON acq.lineitem_detail (lineitem);
Added: trunk/Open-ILS/src/sql/Pg/upgrade/0178.schema.acq.lid-cancel-reason.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/upgrade/0178.schema.acq.lid-cancel-reason.sql (rev 0)
+++ trunk/Open-ILS/src/sql/Pg/upgrade/0178.schema.acq.lid-cancel-reason.sql 2010-03-04 22:11:29 UTC (rev 15705)
@@ -0,0 +1,9 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0178'); -- Scott McKellar
+
+ALTER TABLE acq.lineitem_detail
+ ADD COLUMN cancel_reason INT REFERENCES acq.cancel_reason( id )
+ DEFERRABLE INITIALLY DEFERRED;
+
+COMMIT;
More information about the open-ils-commits
mailing list