[open-ils-commits] r9583 - in branches/acq-experiment/Open-ILS:
examples src/sql/Pg
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue May 13 15:39:10 EDT 2008
Author: miker
Date: 2008-05-13 15:39:07 -0400 (Tue, 13 May 2008)
New Revision: 9583
Modified:
branches/acq-experiment/Open-ILS/examples/fm_IDL.xml
branches/acq-experiment/Open-ILS/src/sql/Pg/200.schema.acq.sql
Log:
adding "code" field to provider, fund and funding_source tables
Modified: branches/acq-experiment/Open-ILS/examples/fm_IDL.xml
===================================================================
--- branches/acq-experiment/Open-ILS/examples/fm_IDL.xml 2008-05-13 16:44:12 UTC (rev 9582)
+++ branches/acq-experiment/Open-ILS/examples/fm_IDL.xml 2008-05-13 19:39:07 UTC (rev 9583)
@@ -3162,6 +3162,7 @@
<field reporter:label="Provider Name" name="name" oils_obj:array_position="4" oils_persist:virtual="false" reporter:datatype="text" oils_persist:i18n="true" />
<field reporter:label="Owner" name="owner" oils_obj:array_position="5" oils_persist:virtual="false" reporter:datatype="org_unit" />
<field reporter:label="Currency" name="currency_type" oils_obj:array_position="6" oils_persist:virtual="false" oils_persist:primitive="string" reporter:datatype="link" />
+ <field reporter:label="Code" name="code" oils_obj:array_position="7" oils_persist:virtual="false" reporter:datatype="text" />
</fields>
<links>
<link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
@@ -3178,10 +3179,10 @@
<field reporter:label="Funding Source Name" name="name" oils_obj:array_position="4" oils_persist:virtual="false" reporter:datatype="text" oils_persist:i18n="true" />
<field reporter:label="Owner" name="owner" oils_obj:array_position="5" oils_persist:virtual="false" reporter:datatype="org_unit" />
<field reporter:label="Currency" name="currency_type" oils_obj:array_position="6" oils_persist:virtual="false" oils_persist:primitive="string" reporter:datatype="link" />
-
- <field name="summary" oils_obj:array_position="7" oils_persist:virtual="true"/>
- <field reporter:label="Allocations" name="allocations" oils_obj:array_position="8" oils_persist:virtual="true" reporter:datatype="link"/>
- <field reporter:label="Credits" name="credits" oils_obj:array_position="9" oils_persist:virtual="true" reporter:datatype="link"/>
+ <field reporter:label="Code" name="code" oils_obj:array_position="7" oils_persist:virtual="false" reporter:datatype="text" />
+ <field name="summary" oils_obj:array_position="8" oils_persist:virtual="true"/>
+ <field reporter:label="Allocations" name="allocations" oils_obj:array_position="9" oils_persist:virtual="true" reporter:datatype="link"/>
+ <field reporter:label="Credits" name="credits" oils_obj:array_position="10" oils_persist:virtual="true" reporter:datatype="link"/>
</fields>
<links>
<link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
@@ -3243,9 +3244,10 @@
<field reporter:label="Name" name="name" oils_obj:array_position="5" oils_persist:virtual="false" reporter:datatype="text" />
<field reporter:label="Year" name="year" oils_obj:array_position="6" oils_persist:virtual="false" reporter:datatype="int" />
<field reporter:label="Currency Type" name="currency_type" oils_obj:array_position="7" oils_persist:virtual="false" reporter:datatype="text" />
- <field name="summary" oils_obj:array_position="8" oils_persist:virtual="true"/>
- <field reporter:label="Allocations" name="allocations" oils_obj:array_position="9" oils_persist:virtual="true" reporter:datatype="link"/>
- <field reporter:label="Debits" name="debits" oils_obj:array_position="10" oils_persist:virtual="true" reporter:datatype="link"/>
+ <field reporter:label="Code" name="code" oils_obj:array_position="8" oils_persist:virtual="false" reporter:datatype="text" />
+ <field name="summary" oils_obj:array_position="9" oils_persist:virtual="true"/>
+ <field reporter:label="Allocations" name="allocations" oils_obj:array_position="10" oils_persist:virtual="true" reporter:datatype="link"/>
+ <field reporter:label="Debits" name="debits" oils_obj:array_position="11" oils_persist:virtual="true" reporter:datatype="link"/>
</fields>
<links>
<link field="org" reltype="has_a" key="id" map="" class="aou"/>
Modified: branches/acq-experiment/Open-ILS/src/sql/Pg/200.schema.acq.sql
===================================================================
--- branches/acq-experiment/Open-ILS/src/sql/Pg/200.schema.acq.sql 2008-05-13 16:44:12 UTC (rev 9582)
+++ branches/acq-experiment/Open-ILS/src/sql/Pg/200.schema.acq.sql 2008-05-13 19:39:07 UTC (rev 9583)
@@ -34,6 +34,7 @@
name TEXT NOT NULL,
owner INT NOT NULL REFERENCES actor.org_unit (id),
currency_type TEXT NOT NULL REFERENCES acq.currency_type (code),
+ code TEXT UNIQUE,
CONSTRAINT provider_name_once_per_owner UNIQUE (name,owner)
);
@@ -42,6 +43,7 @@
name TEXT NOT NULL,
owner INT NOT NULL REFERENCES actor.org_unit (id),
currency_type TEXT NOT NULL REFERENCES acq.currency_type (code),
+ code TEXT UNIQUE,
CONSTRAINT funding_source_name_once_per_owner UNIQUE (name,owner)
);
@@ -58,6 +60,7 @@
name TEXT NOT NULL,
year INT NOT NULL DEFAULT EXTRACT( YEAR FROM NOW() ),
currency_type TEXT NOT NULL REFERENCES acq.currency_type (code),
+ code TEXT UNIQUE,
CONSTRAINT name_once_per_org_year UNIQUE (org,name,year)
);
More information about the open-ils-commits
mailing list