[open-ils-commits] [GIT] Evergreen ILS branch rel_2_11 updated. e475de5fc8f55353be233f033887819b36a12cea
Evergreen Git
git at git.evergreen-ils.org
Mon May 15 16:57:24 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, rel_2_11 has been updated
via e475de5fc8f55353be233f033887819b36a12cea (commit)
via e5635a62e11e35ddd1a92cc6fe844bc4b611e4b1 (commit)
via f89f0430ff7cd4567aa14cd3dabb7b8e98284210 (commit)
from 64ff1e951c9388e2fd5d95b66b026a5cfc31305e (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 e475de5fc8f55353be233f033887819b36a12cea
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>
Conflicts:
Open-ILS/src/sql/Pg/002.schema.config.sql
diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index f83695c..f191c59 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -91,7 +91,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 ('1037', :eg_version); -- jeff/dyrcona
+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 e5635a62e11e35ddd1a92cc6fe844bc4b611e4b1
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 f89f0430ff7cd4567aa14cd3dabb7b8e98284210
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>
Conflicts:
Open-ILS/src/sql/Pg/950.data.seed-values.sql
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 465e94f..d7ea25e 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -4975,7 +4975,7 @@ INSERT into config.org_unit_setting_type
'coust',
'description'
),
- 'string', null)
+ 'link', 'vms')
,( 'opac.browse.pager_shortcuts', 'opac',
oils_i18n_gettext(
'opac.browse.pager_shortcuts',
-----------------------------------------------------------------------
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