[open-ils-commits] [GIT] Evergreen ILS branch master updated. 8e74348fac9c9dd9017d80ddd22e68a6683ee984
Evergreen Git
git at git.evergreen-ils.org
Tue Jan 10 11:46:29 EST 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, master has been updated
via 8e74348fac9c9dd9017d80ddd22e68a6683ee984 (commit)
via ef1d9593715ce5f0c541b037b72e73eb20da35d9 (commit)
from 7387ce9cfd181173f64b265e9ec13815d487271c (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 8e74348fac9c9dd9017d80ddd22e68a6683ee984
Author: Dan Scott <dscott at laurentian.ca>
Date: Thu Dec 29 13:46:24 2011 -0500
SETVAL the permission.grp_tree sequence after adding pinned IDs
If we do not update the associated sequence after adding pinned IDs,
sites will be unable to add new permission groups until enough attempts
have failed. Let's bypass that little bit of pain.
Signed-off-by: Dan Scott <dscott at laurentian.ca>
Signed-off-by: Mike Rylander <mrylander at gmail.com>
diff --git a/Open-ILS/src/sql/Pg/version-upgrade/2.0-2.1-upgrade-db.sql b/Open-ILS/src/sql/Pg/version-upgrade/2.0-2.1-upgrade-db.sql
index 50fb178..e245c83 100644
--- a/Open-ILS/src/sql/Pg/version-upgrade/2.0-2.1-upgrade-db.sql
+++ b/Open-ILS/src/sql/Pg/version-upgrade/2.0-2.1-upgrade-db.sql
@@ -5795,7 +5795,7 @@ INSERT INTO permission.grp_tree (id, name, parent, description, perm_interval, u
id = 15
);
-
+SELECT SETVAL('permission.grp_tree_id_seq'::TEXT, (SELECT MAX(id) FROM permission.grp_tree));
INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable)
SELECT
commit ef1d9593715ce5f0c541b037b72e73eb20da35d9
Author: Dan Scott <dscott at laurentian.ca>
Date: Thu Dec 29 13:33:38 2011 -0500
Prevent permission group conflicts in 2.1 upgrade script
The 2.0-2.1 upgrade script relies on pinned IDs for permission.grp_tree
entries, which might conflict with custom permission groups that a site
might have added previously. A little manipulation can make life safe
for the pinned IDs.
Signed-off-by: Dan Scott <dscott at laurentian.ca>
Signed-off-by: Mike Rylander <mrylander at gmail.com>
diff --git a/Open-ILS/src/sql/Pg/version-upgrade/2.0-2.1-upgrade-db.sql b/Open-ILS/src/sql/Pg/version-upgrade/2.0-2.1-upgrade-db.sql
index 92d7dd3..50fb178 100644
--- a/Open-ILS/src/sql/Pg/version-upgrade/2.0-2.1-upgrade-db.sql
+++ b/Open-ILS/src/sql/Pg/version-upgrade/2.0-2.1-upgrade-db.sql
@@ -5715,6 +5715,18 @@ INSERT INTO permission.perm_list
-- add new perms AND catch up on some missed upgrade data, if needed
+-- Prevent conflicts with existing custom permission groups; as of 2.0.10,
+-- highest permission.grp_tree ID was 10 for Local System Administrator
+UPDATE permission.grp_tree SET id = id + 100 WHERE id > 10;
+UPDATE permission.grp_tree SET parent = parent + 100 WHERE parent > 10;
+UPDATE actor.usr SET profile = profile + 100 WHERE profile > 10;
+UPDATE permission.grp_perm_map SET grp = grp + 100 WHERE grp > 10;
+UPDATE permission.usr_grp_map SET grp = grp + 100 WHERE grp > 10;
+UPDATE permission.grp_penalty_threshold SET grp = grp + 100 WHERE grp > 10;
+UPDATE config.circ_matrix_matchpoint SET grp = grp + 100 WHERE grp > 10;
+UPDATE config.hold_matrix_matchpoint SET requestor_grp = requestor_grp + 100 WHERE requestor_grp > 10;
+UPDATE config.hold_matrix_matchpoint SET usr_grp = usr_grp + 100 WHERE usr_grp > 10;
+
-- we could get away from these fixed-id inserts here, but then this
-- upgrade would be ahead of the mainline, I think
-----------------------------------------------------------------------
Summary of changes:
.../sql/Pg/version-upgrade/2.0-2.1-upgrade-db.sql | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list