[open-ils-commits] [GIT] Evergreen ILS branch rel_2_1 updated. 7a238e086a1a074914dcd8f53a663b109f106685
Evergreen Git
git at git.evergreen-ils.org
Tue Jan 10 11:45:08 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, rel_2_1 has been updated
via 7a238e086a1a074914dcd8f53a663b109f106685 (commit)
via 696b1de85eaf2b42b7b85ab62dd160444ce3f5b1 (commit)
from cca9eb12e0173214a1521b45cc16a79e348421b3 (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 7a238e086a1a074914dcd8f53a663b109f106685
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/2.0-2.1-upgrade-db.sql b/Open-ILS/src/sql/Pg/2.0-2.1-upgrade-db.sql
index 25e4d12..81fdcc8 100644
--- a/Open-ILS/src/sql/Pg/2.0-2.1-upgrade-db.sql
+++ b/Open-ILS/src/sql/Pg/2.0-2.1-upgrade-db.sql
@@ -5797,7 +5797,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 696b1de85eaf2b42b7b85ab62dd160444ce3f5b1
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/2.0-2.1-upgrade-db.sql b/Open-ILS/src/sql/Pg/2.0-2.1-upgrade-db.sql
index 1acebc3..25e4d12 100644
--- a/Open-ILS/src/sql/Pg/2.0-2.1-upgrade-db.sql
+++ b/Open-ILS/src/sql/Pg/2.0-2.1-upgrade-db.sql
@@ -5717,6 +5717,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:
Open-ILS/src/sql/Pg/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