Quote column names on insert

This commit is contained in:
Bart Visscher 2014-01-11 12:22:23 +01:00
parent 4e1a3f212f
commit 1b7eb4dc6c
1 changed files with 5 additions and 1 deletions

View File

@ -194,7 +194,11 @@ class ConvertFromSqlite extends Command {
$progress->setRedrawFrequency($count > 100 ? 5 : 1);
while($row = $statement->fetch()) {
$progress->advance();
$toDB->insert($table, $row);
$data = array();
foreach ($row as $columnName => $value) {
$data[$toDB->quoteIdentifier($columnName)] = $value;
}
$toDB->insert($table, $data);
}
$progress->finish();
}