[open-ils-commits] [GIT] Evergreen ILS branch rel_2_2 updated. 765db53ef7bff1129641e24e7d1b5d0cf954f16f
Evergreen Git
git at git.evergreen-ils.org
Fri Jun 1 15:42:14 EDT 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_2 has been updated
via 765db53ef7bff1129641e24e7d1b5d0cf954f16f (commit)
from efedb3be5075d11f9c60c2f9814d5cdcd6c1f540 (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 765db53ef7bff1129641e24e7d1b5d0cf954f16f
Author: Galen Charlton <gmc at esilibrary.com>
Date: Thu May 31 23:31:11 2012 -0400
lp#1007248: tweak order in which pgt rows are renumbered
Need to renumber from highest to lowest. Because the primary
key constraint is not deferred, doing the renumbering in a single
statement will fail if there is overlap between the set of
existing pgt.id values and the set of {pgt.id + 100}.
Signed-off-by: Galen Charlton <gmc at esilibrary.com>
Signed-off-by: Bill Erickson <berick at esilibrary.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 88cb563..3638766 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
@@ -5732,7 +5732,16 @@ INSERT INTO permission.perm_list
-- 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;
+DO $$
+DECLARE i INTEGER;
+BEGIN
+ FOR i IN
+ SELECT id FROM permission.grp_tree WHERE id > 10 ORDER BY id DESC
+ LOOP
+ UPDATE permission.grp_tree SET id = id + 100 WHERE id = i;
+ END LOOP;
+END;
+$$;
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;
-----------------------------------------------------------------------
Summary of changes:
.../sql/Pg/version-upgrade/2.0-2.1-upgrade-db.sql | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list