From bd5b7522c487906ca352de48b34e681e51cbcf39 Mon Sep 17 00:00:00 2001 From: scottmk Date: Wed, 23 Dec 2009 16:35:17 +0000 Subject: [PATCH] Add a boolean "rollover" column to acq.fund, to denote which funds are subject to rollover. 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/0123.schema.acq-fund-rollover.sql M Open-ILS/examples/fm_IDL.xml git-svn-id: svn://svn.open-ils.org/ILS/trunk@15230 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/0123.schema.acq-fund-rollover.sql | 8 ++++++++ 4 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 Open-ILS/src/sql/Pg/upgrade/0123.schema.acq-fund-rollover.sql diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index 5da71239fe..17559de816 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -4538,6 +4538,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 0e1faa7b8a..9747068c72 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 ('0122'); -- miker +INSERT INTO config.upgrade_log (version) VALUES ('0123'); -- 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 cfe22199c5..8b5d2b592a 100644 --- a/Open-ILS/src/sql/Pg/200.schema.acq.sql +++ b/Open-ILS/src/sql/Pg/200.schema.acq.sql @@ -111,6 +111,7 @@ CREATE TABLE acq.fund ( year INT NOT NULL DEFAULT EXTRACT( YEAR FROM NOW() ), currency_type TEXT NOT NULL REFERENCES acq.currency_type (code) DEFERRABLE INITIALLY DEFERRED, code TEXT, + rollover BOOL NOT NULL DEFAULT FALSE, CONSTRAINT name_once_per_org_year UNIQUE (org,name,year), CONSTRAINT code_once_per_org_year UNIQUE (org, code, year) ); diff --git a/Open-ILS/src/sql/Pg/upgrade/0123.schema.acq-fund-rollover.sql b/Open-ILS/src/sql/Pg/upgrade/0123.schema.acq-fund-rollover.sql new file mode 100644 index 0000000000..59b4de7fc3 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0123.schema.acq-fund-rollover.sql @@ -0,0 +1,8 @@ +BEGIN; + +INSERT INTO config.upgrade_log (version) VALUES ('0123'); -- Scott McKellar + +ALTER TABLE acq.fund +ADD COLUMN rollover BOOL NOT NULL DEFAULT FALSE; + +COMMIT; -- 2.11.0