SETVAL the permission.grp_tree sequence after adding pinned IDs user/dbs/lp893345_avoid_pgt_upgrade_conflicts_2_1
authorDan Scott <dscott@laurentian.ca>
Thu, 29 Dec 2011 18:46:24 +0000 (13:46 -0500)
committerDan Scott <dscott@laurentian.ca>
Thu, 29 Dec 2011 18:48:58 +0000 (13:48 -0500)
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@laurentian.ca>
Open-ILS/src/sql/Pg/2.0-2.1-upgrade-db.sql

index 25e4d12..81fdcc8 100644 (file)
@@ -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