[open-ils-commits] [GIT] Evergreen ILS branch master updated. e6bd3d895909b732512b9fa2f4ab8a18c8eaef82
Evergreen Git
git at git.evergreen-ils.org
Mon May 15 16:57:23 EDT 2017
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 e6bd3d895909b732512b9fa2f4ab8a18c8eaef82 (commit)
via a4d2abbe480bb86495a52b382f1f587fcf64a060 (commit)
via 3434400baf0a3cca76c5c36ed787bac97dd80ebb (commit)
from 020d548c33e6ee4ce5ad1a542f6f9861b4257129 (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 e6bd3d895909b732512b9fa2f4ab8a18c8eaef82
Author: Galen Charlton <gmc at equinoxinitiative.org>
Date: Mon May 15 17:03:28 2017 -0400
LP#1552861: stamp database update
Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index 7d4393a..febaca1 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -90,7 +90,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 ('1038', :eg_version); -- csharp/berick
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1039', :eg_version); -- jeffdavis/gmcharlt
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.change_default_match_set_ous_type.sql b/Open-ILS/src/sql/Pg/upgrade/1039.data.change_default_match_set_ous_type.sql
similarity index 91%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.data.change_default_match_set_ous_type.sql
rename to Open-ILS/src/sql/Pg/upgrade/1039.data.change_default_match_set_ous_type.sql
index 67ac116..46b3619 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.change_default_match_set_ous_type.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/1039.data.change_default_match_set_ous_type.sql
@@ -1,6 +1,6 @@
BEGIN;
--- SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+SELECT evergreen.upgrade_deps_block_check('1039', :eg_version); -- jeffdavis/gmcharlt
UPDATE config.org_unit_setting_type
SET datatype = 'link', fm_class = 'vms'
commit a4d2abbe480bb86495a52b382f1f587fcf64a060
Author: Galen Charlton <gmc at equinoxinitiative.org>
Date: Wed May 10 10:00:46 2017 -0700
LP#1552861: add upgrade script
Also, a test plan for the fix:
[1] Set the vandelay.default_match_set setting for several
org units. In at least one case, set it to the ID
of a valid vandelay.match_set entry; in another case,
set it to a numeric ID that doesn't match any existing
vms rows; and finally, in another case set it to the
name of a match set.
[2] Apply the patch and run the database update. Verify that
the update script will indicate that there are invalid
settings, then delete.
[3] Open the library settings editor and verify that in the
case where a valid match set was used, the editor provides
a drop-down with possible vms values with the correct
one selected.
Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
Signed-off-by: Jeff Davis <jdavis at sitka.bclibraries.ca>
Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.change_default_match_set_ous_type.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.change_default_match_set_ous_type.sql
new file mode 100644
index 0000000..67ac116
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.change_default_match_set_ous_type.sql
@@ -0,0 +1,38 @@
+BEGIN;
+
+-- SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+UPDATE config.org_unit_setting_type
+SET datatype = 'link', fm_class = 'vms'
+WHERE name = 'vandelay.default_match_set'
+AND datatype = 'string'
+AND fm_class IS NULL;
+
+\echo Existing vandelay.default_match_set that do not
+\echo correspond to match sets
+SELECT aou.shortname, aous.value
+FROM actor.org_unit_setting aous
+JOIN actor.org_unit aou ON (aou.id = aous.org_unit)
+WHERE aous.name = 'vandelay.default_match_set'
+AND (
+ value !~ '^"[0-9]+"$'
+ OR
+ oils_json_to_text(aous.value)::INT NOT IN (
+ SELECT id FROM vandelay.match_set
+ )
+);
+
+\echo And now deleting the bad values, as otherwise they
+\echo will break the Library Settings Editor.
+DELETE
+FROM actor.org_unit_setting aous
+WHERE aous.name = 'vandelay.default_match_set'
+AND (
+ value !~ '^"[0-9]+"$'
+ OR
+ oils_json_to_text(aous.value)::INT NOT IN (
+ SELECT id FROM vandelay.match_set
+ )
+);
+
+COMMIT;
commit 3434400baf0a3cca76c5c36ed787bac97dd80ebb
Author: Jeff Davis <jdavis at sitka.bclibraries.ca>
Date: Thu Mar 3 10:55:34 2016 -0800
LP#1552861: use correct datatype for vandelay.default_match_set org setting
Values for this setting should be links to vandelay.match_set, not strings.
Signed-off-by: Jeff Davis <jdavis at sitka.bclibraries.ca>
Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
Conflicts:
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
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 91e2306..a657039 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -5073,7 +5073,7 @@ INSERT into config.org_unit_setting_type
'coust',
'description'
),
- 'string', null)
+ 'link', 'vms')
,(
'cat.default_merge_profile', 'cat',
oils_i18n_gettext(
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +-
Open-ILS/src/sql/Pg/950.data.seed-values.sql | 2 +-
...1039.data.change_default_match_set_ous_type.sql | 38 ++++++++++++++++++++
3 files changed, 40 insertions(+), 2 deletions(-)
create mode 100644 Open-ILS/src/sql/Pg/upgrade/1039.data.change_default_match_set_ous_type.sql
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list