protected function clearData($table, $clearLinks = false)
    {
        if ($this->option('clear')) {
            $this->db->statement('SET FOREIGN_KEY_CHECKS=0;');

            $this->db->table($table)->truncate();

            if ($clearLinks) {
                $this->db->table('table_links')->where('new_table', $table)->delete();
            }

            $this->db->statement('SET FOREIGN_KEY_CHECKS=1;');
        }
    }