From 4c6c8d5f8da04a9a37d9c0df5ac1fdaff0e859b8 Mon Sep 17 00:00:00 2001 From: scottmk Date: Wed, 28 Apr 2010 14:41:03 +0000 Subject: [PATCH] Add keep_debits column to acq.cancel_reason. Add a row for delivered_but_lost, with keep_debits = TRUE. 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/0242.schema.acq-cancel-reason-keep-debits.sql M Open-ILS/src/sql/Pg/950.data.seed-values.sql M Open-ILS/examples/fm_IDL.xml git-svn-id: svn://svn.open-ils.org/ILS/trunk@16330 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/examples/fm_IDL.xml | 1 + Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +- Open-ILS/src/sql/Pg/200.schema.acq.sql | 1 + Open-ILS/src/sql/Pg/950.data.seed-values.sql | 4 +++- .../Pg/upgrade/0242.schema.acq-cancel-reason-keep-debits.sql | 12 ++++++++++++ 5 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 Open-ILS/src/sql/Pg/upgrade/0242.schema.acq-cancel-reason-keep-debits.sql diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index d8e1c23e1..e909f1b7f 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -5303,6 +5303,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 6e448d81b..790c44546 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -60,7 +60,7 @@ CREATE TABLE config.upgrade_log ( install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW() ); -INSERT INTO config.upgrade_log (version) VALUES ('0241'); -- Scott McKellar +INSERT INTO config.upgrade_log (version) VALUES ('0242'); -- 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 fe1f651ef..bf678e723 100644 --- a/Open-ILS/src/sql/Pg/200.schema.acq.sql +++ b/Open-ILS/src/sql/Pg/200.schema.acq.sql @@ -359,6 +359,7 @@ CREATE TABLE acq.cancel_reason ( DEFERRABLE INITIALLY DEFERRED, label TEXT NOT NULL, description TEXT NOT NULL, + keep_debits BOOL NOT NULL DEFAULT FALSE, CONSTRAINT acq_cancel_reason_one_per_org_unit UNIQUE( org_unit, label ) ); diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql index 533fa8516..61f202542 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -4683,7 +4683,9 @@ INSERT INTO acq.cancel_reason ( id, org_unit, label, description ) VALUES ( 1, 1, 'invalid_isbn', oils_i18n_gettext( 1, 'ISBN is unrecognizable', 'acqcr', 'label' )); INSERT INTO acq.cancel_reason ( id, org_unit, label, description ) VALUES ( 2, 1, 'postpone', oils_i18n_gettext( 2, 'Title has been postponed', 'acqcr', 'label' )); - +INSERT INTO acq.cancel_reason ( id, org_unit, label, description, keep_debits ) VALUES ( + 3, 1, 'delivered_but_lost', + oils_i18n_gettext( 2, 'Delivered but not received; presumed lost', 'acqcr', 'label' ), TRUE ); INSERT INTO config.org_unit_setting_type ( name, label, description, datatype ) VALUES ( diff --git a/Open-ILS/src/sql/Pg/upgrade/0242.schema.acq-cancel-reason-keep-debits.sql b/Open-ILS/src/sql/Pg/upgrade/0242.schema.acq-cancel-reason-keep-debits.sql new file mode 100644 index 000000000..fe88db1e6 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0242.schema.acq-cancel-reason-keep-debits.sql @@ -0,0 +1,12 @@ +BEGIN; + +INSERT INTO config.upgrade_log (version) VALUES ('0242'); -- Scott McKellar + +ALTER TABLE acq.cancel_reason + ADD COLUMN keep_debits BOOL NOT NULL DEFAULT FALSE; + +INSERT INTO acq.cancel_reason ( id, org_unit, label, description, keep_debits ) VALUES ( + 3, 1, 'delivered_but_lost', + oils_i18n_gettext( 2, 'Delivered but not received; presumed lost', 'acqcr', 'label' ), TRUE ); + +COMMIT; -- 2.11.0