]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/sql/Pg/upgrade/0241.schema.acq-po-item.sql
truncate fines to max fine amount (LP#1145284)
[working/Evergreen.git] / Open-ILS / src / sql / Pg / upgrade / 0241.schema.acq-po-item.sql
1 BEGIN;
2
3 INSERT INTO config.upgrade_log (version) VALUES ('0241'); -- Scott McKellar
4
5 CREATE TABLE acq.po_item (
6         id              SERIAL      PRIMARY KEY,
7         purchase_order  INT         REFERENCES acq.purchase_order (id)
8                                     ON UPDATE CASCADE ON DELETE SET NULL
9                                     DEFERRABLE INITIALLY DEFERRED,
10         fund_debit      INT         REFERENCES acq.fund_debit (id)
11                                     DEFERRABLE INITIALLY DEFERRED,
12         inv_item_type   TEXT        NOT NULL
13                                     REFERENCES acq.invoice_item_type (code)
14                                     DEFERRABLE INITIALLY DEFERRED,
15         title           TEXT,
16         author          TEXT,
17         note            TEXT,
18         estimated_cost  NUMERIC(8,2),
19         fund            INT         REFERENCES acq.fund (id)
20                                     DEFERRABLE INITIALLY DEFERRED
21 );
22
23 COMMIT;