[open-ils-commits] r13675 - in trunk/Open-ILS: examples src/sql/Pg (scottmk)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Jul 21 16:34:06 EDT 2009


Author: scottmk
Date: 2009-07-21 16:34:05 -0400 (Tue, 21 Jul 2009)
New Revision: 13675

Modified:
   trunk/Open-ILS/examples/fm_IDL.xml
   trunk/Open-ILS/src/sql/Pg/090.schema.action.sql
Log:
Adding a column "workstation" to action.circulation


Modified: trunk/Open-ILS/examples/fm_IDL.xml
===================================================================
--- trunk/Open-ILS/examples/fm_IDL.xml	2009-07-21 17:20:46 UTC (rev 13674)
+++ trunk/Open-ILS/examples/fm_IDL.xml	2009-07-21 20:34:05 UTC (rev 13675)
@@ -729,9 +729,11 @@
 			<field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
 			<field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
 			<field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
+			<field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
 		</fields>
 		<links>
 			<link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
+			<link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
 		</links>
 	</class>
 
@@ -2072,6 +2074,7 @@
 			<field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
 			<field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
 			<field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
+			<field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
 			<field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
 			<field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
 			<field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
@@ -2095,6 +2098,7 @@
 			<link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
 			<link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
 			<link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
+			<link field="workstation" reltype="might_have" key="id" map="" class="aws"/>
 		</links>
 	</class>
 	<class id="combcirc" controller="open-ils.cstore" oils_obj:fieldmapper="action::all_circulation" oils_persist:tablename="action.all_circulation" reporter:core="true" reporter:label="Combined Aged and Active Circulations" oils_persist:readonly="true">

Modified: trunk/Open-ILS/src/sql/Pg/090.schema.action.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/090.schema.action.sql	2009-07-21 17:20:46 UTC (rev 13674)
+++ trunk/Open-ILS/src/sql/Pg/090.schema.action.sql	2009-07-21 20:34:05 UTC (rev 13675)
@@ -123,7 +123,10 @@
 	duration_rule		TEXT				NOT NULL, -- name of "circ duration" rule
 	recuring_fine_rule	TEXT				NOT NULL, -- name of "circ fine" rule
 	max_fine_rule		TEXT				NOT NULL, -- name of "max fine" rule
-	stop_fines		TEXT				CHECK (stop_fines IN ('CHECKIN','CLAIMSRETURNED','LOST','MAXFINES','RENEW','LONGOVERDUE'))
+	stop_fines		TEXT				CHECK (stop_fines IN ('CHECKIN','CLAIMSRETURNED','LOST','MAXFINES','RENEW','LONGOVERDUE')),
+	workstation         INT        REFERENCES actor.org_unit(id)
+	                               ON DELETE SET NULL
+								   DEFERRABLE INITIALLY DEFERRED
 ) INHERITS (money.billable_xact);
 ALTER TABLE action.circulation ADD PRIMARY KEY (id);
 CREATE INDEX circ_open_xacts_idx ON action.circulation (usr) WHERE xact_finish IS NULL;



More information about the open-ils-commits mailing list