set db to sqlite.
create a user's group
grant repository create to group
delete users group
examine users_group_to_perm table for the entry that's still there
A custom add-on that I wrote to create the group if it doesn't exist then set it's permission fails when I try to update its permissions because they have already been set:
IntegrityError: (IntegrityError) columns users_group_id, permission_id are not unique u'INSERT INTO users_group_to_perm (users_group_id, permission_id) VALUES (?, ?)' (1, 10)