[open-ils-commits] r15068 - 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
Thu Dec 3 10:58:36 EST 2009
Author: miker
Date: 2009-12-03 10:58:34 -0500 (Thu, 03 Dec 2009)
New Revision: 15068
Added:
trunk/Open-ILS/src/sql/Pg/upgrade/0103.schema.booking.max_fine.sql
Modified:
trunk/Open-ILS/examples/fm_IDL.xml
trunk/Open-ILS/src/sql/Pg/095.schema.booking.sql
Log:
adding max_fine to resource_type and reservation; moved au.reservation pointer from capturing staff to requesting user
Modified: trunk/Open-ILS/examples/fm_IDL.xml
===================================================================
--- trunk/Open-ILS/examples/fm_IDL.xml 2009-12-03 15:40:16 UTC (rev 15067)
+++ trunk/Open-ILS/examples/fm_IDL.xml 2009-12-03 15:58:34 UTC (rev 15068)
@@ -1755,7 +1755,7 @@
<link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
<link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
<link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
- <link field="reservations" reltype="has_many" key="capture_staff" map="" class="bresv"/>
+ <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
</links>
</class>
@@ -2357,6 +2357,7 @@
<field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
<field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
<field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
+ <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
<field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
<field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
<field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
@@ -2463,8 +2464,6 @@
<field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
<field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
<field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
- <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
- <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
<field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
<field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
<field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
@@ -2480,6 +2479,7 @@
<field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
<field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
<field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
+ <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
<field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
<field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
<field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
@@ -2489,8 +2489,6 @@
<field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
</fields>
<links>
- <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
- <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
<link field="usr" reltype="has_a" key="id" map="" class="au"/>
<link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
<link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
Modified: trunk/Open-ILS/src/sql/Pg/095.schema.booking.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/095.schema.booking.sql 2009-12-03 15:40:16 UTC (rev 15067)
+++ trunk/Open-ILS/src/sql/Pg/095.schema.booking.sql 2009-12-03 15:58:34 UTC (rev 15068)
@@ -25,6 +25,7 @@
name TEXT NOT NULL,
fine_interval INTERVAL,
fine_amount DECIMAL(8,2) NOT NULL DEFAULT 0,
+ max_fine DECIMAL(8,2),
owner INT NOT NULL
REFERENCES actor.org_unit( id )
DEFERRABLE INITIALLY DEFERRED,
@@ -109,6 +110,7 @@
booking_interval INTERVAL,
fine_interval INTERVAL,
fine_amount DECIMAL(8,2),
+ max_fine DECIMAL(8,2),
target_resource_type INT NOT NULL
REFERENCES booking.resource_type(id)
ON DELETE CASCADE
Added: trunk/Open-ILS/src/sql/Pg/upgrade/0103.schema.booking.max_fine.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/upgrade/0103.schema.booking.max_fine.sql (rev 0)
+++ trunk/Open-ILS/src/sql/Pg/upgrade/0103.schema.booking.max_fine.sql 2009-12-03 15:58:34 UTC (rev 15068)
@@ -0,0 +1,8 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0103'); -- miker
+
+ALTER TABLE booking.resource_type ADD COLUMN max_fine NUMERIC(8,2);
+ALTER TABLE booking.reservation ADD COLUMN max_fine NUMERIC(8,2);
+
+COMMIT;
More information about the open-ils-commits
mailing list