Skip to content

Commit

Permalink
Drop SymfonyStyle[listing] for sqls (#9679)
Browse files Browse the repository at this point in the history
This was super annoying as UpdateCommand printed sqls prefixed with `*` so it was not possible to copy statements anymore without manually removing those asterisks.

This removes prefixing sqls and makes it consistent with Create and Drop commands.
  • Loading branch information
simPod committed Apr 26, 2022
1 parent d9508e9 commit 1dd2b44
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ protected function executeSchemaCommand(InputInterface $input, OutputInterface $
if ($dumpSql) {
$ui->text('The following SQL statements will be executed:');
$ui->newLine();
$ui->listing($sqls);
foreach ($sqls as $sql) {
$ui->text(sprintf(' %s;', $sql));
}
}

if ($force) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
if ($output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {
$sqls = $validator->getUpdateSchemaList();
$ui->comment(sprintf('<info>%d</info> schema diff(s) detected:', count($sqls)));
$ui->listing($sqls);
foreach ($sqls as $sql) {
$ui->text(sprintf(' %s;', $sql));
}
}

$exit += 2;
Expand Down

0 comments on commit 1dd2b44

Please sign in to comment.