Please don't double post, let's stick to this discussion. Looks like the permissions are wrong, somehow you have a duplicate entry in group_permission. You can try truncating that table and then - once the upgrade succeeded - update the permissions again in the admin.