Escaping table name in the table:drop command and improve error message for the fixtures:load command
This commit is contained in:
parent
58d793e01e
commit
a6bb5d2d52
2 changed files with 3 additions and 3 deletions
|
|
@ -100,10 +100,10 @@ EOT
|
|||
|
||||
$connection->exec('SET FOREIGN_KEY_CHECKS = 0;');
|
||||
|
||||
$tablesToDelete = join(', ', $tablesToDelete);
|
||||
$tablesToDelete = join('`, `', $tablesToDelete);
|
||||
|
||||
if ('' !== $tablesToDelete) {
|
||||
$connection->exec('DROP TABLE ' . $tablesToDelete . ' ;');
|
||||
$connection->exec('DROP TABLE `' . $tablesToDelete . '` ;');
|
||||
|
||||
$output->writeln(sprintf('Table' . $tablePlural . ' <info><comment>%s</comment> has been dropped.</info>', $tablesToDelete));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue