[open-ils-commits] r8764 - in branches/acq-experiment/Open-ILS:
examples src/sql/Pg
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Feb 18 16:51:42 EST 2008
Author: miker
Date: 2008-02-18 16:21:32 -0500 (Mon, 18 Feb 2008)
New Revision: 8764
Modified:
branches/acq-experiment/Open-ILS/examples/fm_IDL.xml
branches/acq-experiment/Open-ILS/src/sql/Pg/200.schema.acq.sql
Log:
moving some acq fields around
Modified: branches/acq-experiment/Open-ILS/examples/fm_IDL.xml
===================================================================
--- branches/acq-experiment/Open-ILS/examples/fm_IDL.xml 2008-02-18 19:12:43 UTC (rev 8763)
+++ branches/acq-experiment/Open-ILS/examples/fm_IDL.xml 2008-02-18 21:21:32 UTC (rev 8764)
@@ -2624,9 +2624,7 @@
<field reporter:label="Edit Time" name="edit_time" oils_obj:array_position="7" oils_persist:virtual="false" reporter:datatype="timestamp" />
<field reporter:label="Provider" name="provider" oils_obj:array_position="8" oils_persist:virtual="false" reporter:datatype="link" />
<field reporter:label="State" name="state" oils_obj:array_position="9" oils_persist:virtual="false" reporter:datatype="text" />
- <field reporter:label="Expected Receive Date" name="expected_recv_time" oils_obj:array_position="10" oils_persist:virtual="false" reporter:datatype="timestamp" />
- <field reporter:label="Actual Receive Date" name="recv_time" oils_obj:array_position="11" oils_persist:virtual="false" reporter:datatype="timestamp" />
- <field reporter:label="Line Items" name="lineitems" oils_obj:array_position="12" oils_persist:virtual="true" reporter:datatype="link" />
+ <field reporter:label="Line Items" name="lineitems" oils_obj:array_position="10" oils_persist:virtual="true" reporter:datatype="link" />
</fields>
<links>
<link field="owner" reltype="has_a" key="id" map="" class="au"/>
@@ -2693,8 +2691,9 @@
<field reporter:label="Evergreen Bib ID" name="eg_bib_id" oils_obj:array_position="9" oils_persist:virtual="false" reporter:datatype="link" />
<field reporter:label="List Price" name="list_price" oils_obj:array_position="10" oils_persist:virtual="false" reporter:datatype="money" />
<field reporter:label="Item Count" name="item_count" oils_obj:array_position="11" oils_persist:virtual="false" reporter:datatype="int" />
- <field reporter:label="Descriptive Attributes" name="attributes" oils_obj:array_position="12" oils_persist:virtual="true" reporter:datatype="link" />
- <field reporter:label="Line Item Details" name="lineitem_details" oils_obj:array_position="13" oils_persist:virtual="true" reporter:datatype="link" />
+ <field reporter:label="Expected Receive Date" name="expected_recv_time" oils_obj:array_position="12" oils_persist:virtual="false" reporter:datatype="timestamp" />
+ <field reporter:label="Descriptive Attributes" name="attributes" oils_obj:array_position="13" oils_persist:virtual="true" reporter:datatype="link" />
+ <field reporter:label="Line Item Details" name="lineitem_details" oils_obj:array_position="14" oils_persist:virtual="true" reporter:datatype="link" />
</fields>
<links>
<link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
@@ -2767,6 +2766,8 @@
<field reporter:label="Evergreen Copy ID" name="eg_copy_id" oils_obj:array_position="5" oils_persist:virtual="false" reporter:datatype="link" />
<field reporter:label="Barcode" name="barcode" oils_obj:array_position="6" oils_persist:virtual="false" reporter:datatype="text" />
<field reporter:label="Call Number Label" name="cn_label" oils_obj:array_position="7" oils_persist:virtual="false" reporter:datatype="text" />
+ <field reporter:label="Actual Receive Date" name="recv_time" oils_obj:array_position="8" oils_persist:virtual="false" reporter:datatype="timestamp" />
+ <field reporter:label="Fund Debit" name="fund_debit" oils_obj:array_position="9" oils_persist:virtual="false" reporter:datatype="money" />
</fields>
<links>
<link field="po_lineitem" reltype="has_a" key="id" map="" class="acqpoli"/>
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-02-18 19:12:43 UTC (rev 8763)
+++ branches/acq-experiment/Open-ILS/src/sql/Pg/200.schema.acq.sql 2008-02-18 21:21:32 UTC (rev 8764)
@@ -94,15 +94,13 @@
);
CREATE TABLE acq.purchase_order (
- id SERIAL PRIMARY KEY,
- owner INT NOT NULL REFERENCES actor.usr (id),
- default_fund INT REFERENCES acq.fund (id),
- create_time TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
- edit_time TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
- provider INT NOT NULL REFERENCES acq.provider (id),
- state TEXT NOT NULL DEFAULT 'new',
- expected_recv_time TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW() + '30 days',
- recv_time TIMESTAMP WITH TIME ZONE
+ id SERIAL PRIMARY KEY,
+ owner INT NOT NULL REFERENCES actor.usr (id),
+ default_fund INT REFERENCES acq.fund (id),
+ create_time TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
+ edit_time TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
+ provider INT NOT NULL REFERENCES acq.provider (id),
+ state TEXT NOT NULL DEFAULT 'new',
);
CREATE INDEX po_owner_idx ON acq.purchase_order (owner);
CREATE INDEX po_provider_idx ON acq.purchase_order (provider);
@@ -131,16 +129,16 @@
);
CREATE TABLE acq.po_lineitem (
- id BIGSERIAL PRIMARY KEY,
- purchase_order INT NOT NULL REFERENCES acq.purchase_order (id),
- fund INT REFERENCES acq.fund (id),
- fund_debit INT REFERENCES acq.fund_debit (id),
- create_time TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
- edit_time TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
- marc TEXT NOT NULL,
- eg_bib_id INT REFERENCES biblio.record_entry (id),
- list_price NUMERIC,
- item_count INT NOT NULL DEFAULT 0
+ id BIGSERIAL PRIMARY KEY,
+ purchase_order INT NOT NULL REFERENCES acq.purchase_order (id),
+ fund INT REFERENCES acq.fund (id),
+ expected_recv_time TIMESTAMP WITH TIME ZONE,
+ create_time TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
+ edit_time TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
+ marc TEXT NOT NULL,
+ eg_bib_id INT REFERENCES biblio.record_entry (id),
+ list_price NUMERIC,
+ item_count INT NOT NULL DEFAULT 0
);
CREATE INDEX po_li_po_idx ON acq.po_lineitem (purchase_order);
@@ -158,9 +156,11 @@
CREATE TABLE acq.po_li_detail (
id BIGSERIAL PRIMARY KEY,
po_lineitem INT NOT NULL REFERENCES acq.po_lineitem (id),
+ fund_debit INT REFERENCES acq.fund_debit (id),
eg_copy_id BIGINT REFERENCES asset.copy (id),
barcode TEXT,
- cn_label TEXT
+ cn_label TEXT,
+ recv_time TIMESTAMP WITH TIME ZONE
);
CREATE INDEX po_li_detail_li_idx ON acq.po_li_detail (po_lineitem);
More information about the open-ils-commits
mailing list