[open-ils-commits] [GIT] Evergreen ILS branch master updated. 3c1b6d0a129a45e6073e78cdeaaf2c59515b83cd
Evergreen Git
git at git.evergreen-ils.org
Tue Feb 27 16:09:59 EST 2018
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, master has been updated
via 3c1b6d0a129a45e6073e78cdeaaf2c59515b83cd (commit)
via 5d80c0b64e4a6db818a321c0509f0149a696c4d2 (commit)
from 6aaa85c4d7ed649c1b8a64f81ac45bb3a2889820 (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 3c1b6d0a129a45e6073e78cdeaaf2c59515b83cd
Author: Dan Wells <dbw2 at calvin.edu>
Date: Tue Feb 27 16:08:46 2018 -0500
LP#1737016 Stamping upgrade script for easing constraints on afs.code
Signed-off-by: Dan Wells <dbw2 at calvin.edu>
diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index e8fa263..b230584 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -92,7 +92,7 @@ CREATE TRIGGER no_overlapping_deps
BEFORE INSERT OR UPDATE ON config.db_patch_dependencies
FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates');
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1090', :eg_version); -- berick/dbwells
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1091', :eg_version); -- jboyer/dbwells
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.lp1737016_afs_code.sql b/Open-ILS/src/sql/Pg/upgrade/1091.schema.lp1737016_afs_code.sql
similarity index 79%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.schema.lp1737016_afs_code.sql
rename to Open-ILS/src/sql/Pg/upgrade/1091.schema.lp1737016_afs_code.sql
index bea3fb5..9d0e69f 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.lp1737016_afs_code.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/1091.schema.lp1737016_afs_code.sql
@@ -1,6 +1,6 @@
BEGIN;
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+SELECT evergreen.upgrade_deps_block_check('1091', :eg_version);
ALTER TABLE acq.funding_source DROP CONSTRAINT funding_source_code_key;
ALTER TABLE acq.funding_source ALTER COLUMN code SET NOT NULL;
commit 5d80c0b64e4a6db818a321c0509f0149a696c4d2
Author: Jason Boyer <JBoyer at library.in.gov>
Date: Thu Dec 7 14:45:21 2017 -0500
LP1737016: Ease Constraints on afs.code
acq.funding_source.code currently has a UNIQUE
constraint applied, which can be confusing to
users. This branch only requires that a code be
unique to the funding source's owner, simplifying
the management of funding sources.
Signed-off-by: Jason Boyer <JBoyer at library.in.gov>
Signed-off-by: Remington Steed <rjs7 at calvin.edu>
Signed-off-by: Dan Wells <dbw2 at calvin.edu>
diff --git a/Open-ILS/src/sql/Pg/200.schema.acq.sql b/Open-ILS/src/sql/Pg/200.schema.acq.sql
index c0670bb..60088d1 100644
--- a/Open-ILS/src/sql/Pg/200.schema.acq.sql
+++ b/Open-ILS/src/sql/Pg/200.schema.acq.sql
@@ -154,7 +154,8 @@ CREATE TABLE acq.funding_source (
name TEXT NOT NULL,
owner INT NOT NULL REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED,
currency_type TEXT NOT NULL REFERENCES acq.currency_type (code) DEFERRABLE INITIALLY DEFERRED,
- code TEXT UNIQUE,
+ code TEXT NOT NULL,
+ CONSTRAINT funding_source_code_once_per_owner UNIQUE (code,owner),
CONSTRAINT funding_source_name_once_per_owner UNIQUE (name,owner)
);
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.lp1737016_afs_code.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.lp1737016_afs_code.sql
new file mode 100644
index 0000000..bea3fb5
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.lp1737016_afs_code.sql
@@ -0,0 +1,9 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+ALTER TABLE acq.funding_source DROP CONSTRAINT funding_source_code_key;
+ALTER TABLE acq.funding_source ALTER COLUMN code SET NOT NULL;
+ALTER TABLE acq.funding_source ADD CONSTRAINT funding_source_code_once_per_owner UNIQUE (code,owner);
+
+COMMIT;
diff --git a/docs/RELEASE_NOTES_NEXT/Acquisitions/RELEASE_NOTE_TEMPLATE.adoc b/docs/RELEASE_NOTES_NEXT/Acquisitions/RELEASE_NOTE_TEMPLATE.adoc
new file mode 100644
index 0000000..82c3b23
--- /dev/null
+++ b/docs/RELEASE_NOTES_NEXT/Acquisitions/RELEASE_NOTE_TEMPLATE.adoc
@@ -0,0 +1,9 @@
+Funding Source Codes are now Unique per Owner
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Funding source codes had to be unique across an
+entire installation which is aggravating when
+you can't actually see the other source codes.
+
+Now multiple locations can have the same codes if
+they desire.
+
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +-
Open-ILS/src/sql/Pg/200.schema.acq.sql | 3 ++-
.../Pg/upgrade/1091.schema.lp1737016_afs_code.sql | 9 +++++++++
.../Acquisitions/RELEASE_NOTE_TEMPLATE.adoc | 9 +++++++++
4 files changed, 21 insertions(+), 2 deletions(-)
create mode 100644 Open-ILS/src/sql/Pg/upgrade/1091.schema.lp1737016_afs_code.sql
create mode 100644 docs/RELEASE_NOTES_NEXT/Acquisitions/RELEASE_NOTE_TEMPLATE.adoc
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list