src/Driver/SQLite/SQLiteHandler.php
private function copyData(string $source, string $to, array $mapping)
    {
        $sourceColumns = array_keys($mapping);
        $targetColumns = array_values($mapping);

        //Preparing mapping
        $sourceColumns = array_map([$this, 'identify'], $sourceColumns);
        $targetColumns = array_map([$this, 'identify'], $targetColumns);

        $query = sprintf(
            'INSERT INTO %s (%s) SELECT %s FROM %s',
            $this->identify($to),
            implode(', ', $targetColumns),
            implode(', ', $sourceColumns),
            $this->identify($source)
        );

        $this->run($query);
    }
private function copyData(string $source, string $to, array $mapping)
    {
        $sourceColumns = array_keys($mapping);
        $targetColumns = array_values($mapping);

        //Preparing mapping
        $sourceColumns = array_map([$this, 'identify'], $sourceColumns);
        $targetColumns = array_map([$this, 'identify'], $targetColumns);

        $query = sprintf(
            'INSERT INTO %s (%s) SELECT %s FROM %s',
            $this->identify($to),
            implode(', ', $targetColumns),
            implode(', ', $sourceColumns),
            $this->identify($source)
        );

        $this->run($query);
    }
private function copyData ( string $ source , string $ to , array $ mapping ) { $ sourceColumns = array_keys ( $ mapping ) ; $ targetColumns = array_values ( $ mapping ) ; //Preparing mapping $ sourceColumns = array_map ( [ $ this , 'identify' ] , $ sourceColumns ) ; $ targetColumns = array_map ( [ $ this , 'identify' ] , $ targetColumns ) ; $ query = sprintf ( 'INSERT INTO %s (%s) SELECT %s FROM %s' , $ this -> identify ( $ to ) , implode ( ', ' , $ targetColumns ) , implode ( ', ' , $ sourceColumns ) , $ this -> identify ( $ source ) ) ; $ this -> run ( $ query ) ; }
Copy table data to another location.

@see http://stackoverflow.com/questions/4007014/alter-column-in-sqlite

@param string $source
@param string $to
@param array  $mapping (destination => source)

@throws HandlerException
Copy table data to another location .