SETVAL the permission.grp_tree sequence after adding pinned IDs
authorDan Scott <dscott@laurentian.ca>
Thu, 29 Dec 2011 18:46:24 +0000 (13:46 -0500)
committerMike Rylander <mrylander@gmail.com>
Tue, 10 Jan 2012 16:46:12 +0000 (11:46 -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>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/sql/Pg/version-upgrade/2.0-2.1-upgrade-db.sql

index 50fb178..e245c83 100644 (file)
@@ -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