[open-ils-commits] [GIT] Evergreen ILS branch rel_2_1 updated. 573f15ee1d309f4f79b41e4802013d0ee271fdf8

Evergreen Git git at git.evergreen-ils.org
Fri Jun 1 15:41:46 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_1 has been updated
       via  573f15ee1d309f4f79b41e4802013d0ee271fdf8 (commit)
      from  c91ed7b35048fc59ccb36468e81aae6f3ad42958 (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 573f15ee1d309f4f79b41e4802013d0ee271fdf8
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