From 8cba85e1ad537e8c9b778f32547a1cf0d359c297 Mon Sep 17 00:00:00 2001 From: scottmk Date: Tue, 2 Feb 2010 14:56:16 +0000 Subject: [PATCH] Add active flag to acq.fund table. If a fund is not active, then you shouldn't be able to spend money from it. See KCLS ticket 4201. 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/0146.schema.acq.fund-active.sql M Open-ILS/examples/fm_IDL.xml git-svn-id: svn://svn.open-ils.org/ILS/trunk@15429 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/upgrade/0146.schema.acq.fund-active.sql | 8 ++++++++ 4 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 Open-ILS/src/sql/Pg/upgrade/0146.schema.acq.fund-active.sql diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index 79d3af1d7..4252dd7fd 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -4629,6 +4629,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 06565fdbc..280c1b807 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 ('0145'); -- miker +INSERT INTO config.upgrade_log (version) VALUES ('0146'); -- 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 a8143fb25..4cb811ef3 100644 --- a/Open-ILS/src/sql/Pg/200.schema.acq.sql +++ b/Open-ILS/src/sql/Pg/200.schema.acq.sql @@ -171,6 +171,7 @@ CREATE TABLE acq.fund ( code TEXT, rollover BOOL NOT NULL DEFAULT FALSE, propagate BOOL NOT NULL DEFAULT TRUE, + active BOOL NOT NULL DEFAULT TRUE, CONSTRAINT name_once_per_org_year UNIQUE (org,name,year), CONSTRAINT code_once_per_org_year UNIQUE (org, code, year), CONSTRAINT acq_fund_rollover_implies_propagate CHECK ( propagate OR NOT rollover ) diff --git a/Open-ILS/src/sql/Pg/upgrade/0146.schema.acq.fund-active.sql b/Open-ILS/src/sql/Pg/upgrade/0146.schema.acq.fund-active.sql new file mode 100644 index 000000000..d154a002e --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0146.schema.acq.fund-active.sql @@ -0,0 +1,8 @@ +BEGIN; + +INSERT INTO config.upgrade_log (version) VALUES ('0146'); -- Scott McKellar + +ALTER TABLE acq.fund + ADD COLUMN active BOOL NOT NULL DEFAULT TRUE; + +COMMIT; -- 2.11.0