From efb5608d817ddbeac2a7c019abead38d7e6ec3bc Mon Sep 17 00:00:00 2001 From: scottmk Date: Tue, 9 Mar 2010 17:22:52 +0000 Subject: [PATCH] 1. Add estimated_unit_price column to acq.lineitem. 2. Bring acq.acq_lineitem_history and acq.acq_purchase_order_history into sync with their respective source tables. M Open-ILS/src/sql/Pg/200.schema.acq.sql M Open-ILS/src/sql/Pg/002.schema.config.sql A Open-ILS/src/sql/Pg/upgrade/0183.schema.acq-cancel-reason-history.sql M Open-ILS/examples/fm_IDL.xml git-svn-id: svn://svn.open-ils.org/ILS/trunk@15767 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/examples/fm_IDL.xml | 9 ++++++++- Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +- Open-ILS/src/sql/Pg/200.schema.acq.sql | 1 + .../0183.schema.acq-cancel-reason-history.sql | 20 ++++++++++++++++++++ 4 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 Open-ILS/src/sql/Pg/upgrade/0183.schema.acq-cancel-reason-history.sql diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index 63fdc9a31..e0ad0d680 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -5166,6 +5166,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + @@ -5174,6 +5175,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + @@ -5229,6 +5231,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + @@ -5245,7 +5248,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - + @@ -5275,6 +5278,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + + + @@ -5285,6 +5291,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index 24abc8bbc..ba73b9b74 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -51,7 +51,7 @@ CREATE TABLE config.upgrade_log ( install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW() ); -INSERT INTO config.upgrade_log (version) VALUES ('0182'); -- dbs +INSERT INTO config.upgrade_log (version) VALUES ('0183'); -- Scott McKellar CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/200.schema.acq.sql b/Open-ILS/src/sql/Pg/200.schema.acq.sql index 35abc2db1..047a0a425 100644 --- a/Open-ILS/src/sql/Pg/200.schema.acq.sql +++ b/Open-ILS/src/sql/Pg/200.schema.acq.sql @@ -454,6 +454,7 @@ CREATE TABLE acq.lineitem ( claim_interval INTERVAL, cancel_reason INT REFERENCES acq.cancel_reason( id ) DEFERRABLE INITIALLY DEFERRED, + estimated_unit_price NUMERIC, CONSTRAINT picklist_or_po CHECK (picklist IS NOT NULL OR purchase_order IS NOT NULL) ); CREATE INDEX li_po_idx ON acq.lineitem (purchase_order); diff --git a/Open-ILS/src/sql/Pg/upgrade/0183.schema.acq-cancel-reason-history.sql b/Open-ILS/src/sql/Pg/upgrade/0183.schema.acq-cancel-reason-history.sql new file mode 100644 index 000000000..7e3e2d841 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0183.schema.acq-cancel-reason-history.sql @@ -0,0 +1,20 @@ +BEGIN; + +INSERT INTO config.upgrade_log (version) VALUES ('0183'); -- Scott McKellar + +ALTER TABLE acq.lineitem + ADD COLUMN estimated_unit_price NUMERIC; + +ALTER TABLE acq.acq_lineitem_history + ADD COLUMN claim_interval INTERVAL; + +ALTER TABLE acq.acq_lineitem_history + ADD COLUMN cancel_reason INTEGER; + +ALTER TABLE acq.acq_lineitem_history + ADD COLUMN estimated_unit_price NUMERIC; + +ALTER TABLE acq.acq_purchase_order_history + ADD COLUMN cancel_reason INTEGER; + +COMMIT; -- 2.11.0