[open-ils-commits] [GIT] Evergreen ILS branch rel_2_1 updated. 1c31d5cab88fc70851e626b577b73c6e995a2c64
Evergreen Git
git at git.evergreen-ils.org
Tue Jul 24 14:54:56 EDT 2012
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, rel_2_1 has been updated
via 1c31d5cab88fc70851e626b577b73c6e995a2c64 (commit)
from 192ab45b37d5a37187d37a253a420c3578adf570 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 1c31d5cab88fc70851e626b577b73c6e995a2c64
Author: Bill Erickson <berick at esilibrary.com>
Date: Wed Nov 23 10:54:51 2011 -0500
Add constraint to ACQ PO state value
Limit 'state' values to
'new','pending','on-order','received','cancelled'
https://bugs.launchpad.net/evergreen/+bug/893193
Signed-off-by: Bill Erickson <berick at esilibrary.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index 7aff4be..9ae1a87 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -57,7 +57,7 @@ CREATE TABLE config.upgrade_log (
install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
-INSERT INTO config.upgrade_log (version) VALUES ('0693'); -- denials/miker
+INSERT INTO config.upgrade_log (version) VALUES ('0722'); -- berick/mrpeters/senator
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 7c03d84..544adeb 100644
--- a/Open-ILS/src/sql/Pg/200.schema.acq.sql
+++ b/Open-ILS/src/sql/Pg/200.schema.acq.sql
@@ -379,7 +379,8 @@ CREATE TABLE acq.purchase_order (
name TEXT NOT NULL,
cancel_reason INT REFERENCES acq.cancel_reason( id )
DEFERRABLE INITIALLY DEFERRED,
- prepayment_required BOOLEAN NOT NULL DEFAULT FALSE
+ prepayment_required BOOLEAN NOT NULL DEFAULT FALSE,
+ CONSTRAINT valid_po_state CHECK (state IN ('new','pending','on-order','received','cancelled'))
);
CREATE INDEX po_owner_idx ON acq.purchase_order (owner);
CREATE INDEX po_provider_idx ON acq.purchase_order (provider);
diff --git a/Open-ILS/src/sql/Pg/upgrade/0722.schema.acq-po-state-constraint.sql b/Open-ILS/src/sql/Pg/upgrade/0722.schema.acq-po-state-constraint.sql
new file mode 100644
index 0000000..dd22b2e
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/0722.schema.acq-po-state-constraint.sql
@@ -0,0 +1,10 @@
+-- Evergreen DB patch 0722.schema.acq-po-state-constraint.sql
+--
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0722');
+
+ALTER TABLE acq.purchase_order ADD CONSTRAINT valid_po_state
+ CHECK (state IN ('new','pending','on-order','received','cancelled'));
+
+COMMIT;
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +-
Open-ILS/src/sql/Pg/200.schema.acq.sql | 3 ++-
.../0722.schema.acq-po-state-constraint.sql | 10 ++++++++++
3 files changed, 13 insertions(+), 2 deletions(-)
create mode 100644 Open-ILS/src/sql/Pg/upgrade/0722.schema.acq-po-state-constraint.sql
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list