protected function truncate($table)
    {
        if ($this->db->connection()->getConfig('driver') === 'mysql') {
            $this->db->statement('SET FOREIGN_KEY_CHECKS=0;');
            $this->db->table($table)->truncate();
            $this->db->statement('SET FOREIGN_KEY_CHECKS=1;');
        }
    }