Fix oracle upgrade with populated permissions in db.