Quote column names on insert
This commit is contained in:
parent
4e1a3f212f
commit
1b7eb4dc6c
1 changed files with 5 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue