From f4e41a3683438543f9943d9192c78e8f68dd4723 Mon Sep 17 00:00:00 2001 From: miker Date: Mon, 18 Feb 2008 21:21:32 +0000 Subject: [PATCH] moving some acq fields around git-svn-id: svn://svn.open-ils.org/ILS/branches/acq-experiment@8764 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/examples/fm_IDL.xml | 11 +++++----- Open-ILS/src/sql/Pg/200.schema.acq.sql | 40 +++++++++++++++++----------------- 2 files changed, 26 insertions(+), 25 deletions(-) diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index a1971a48d9..1d37e8bd86 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -2624,9 +2624,7 @@ - - - + @@ -2693,8 +2691,9 @@ - - + + + @@ -2767,6 +2766,8 @@ + + diff --git a/Open-ILS/src/sql/Pg/200.schema.acq.sql b/Open-ILS/src/sql/Pg/200.schema.acq.sql index 8d56161aa5..07bfc59ca4 100644 --- a/Open-ILS/src/sql/Pg/200.schema.acq.sql +++ b/Open-ILS/src/sql/Pg/200.schema.acq.sql @@ -94,15 +94,13 @@ CREATE TABLE acq.picklist ( ); 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.picklist_entry ( ); 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 INDEX po_li_note_li_idx ON acq.po_li_note (po_lineitem); 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); -- 2.11.0