Skip to content

Commit

Permalink
Merge pull request #728 from armetiz/patch-1
Browse files Browse the repository at this point in the history
Color message like the update tools
  • Loading branch information
Ocramius committed Jul 22, 2013
2 parents 8d2826c + 4882ff1 commit 4bc8f7b
Showing 1 changed file with 6 additions and 3 deletions.
Expand Up @@ -106,7 +106,7 @@ protected function executeSchemaCommand(InputInterface $input, OutputInterface $
return 0;
}

$output->writeln('ATTENTION: This operation should not be executed in a production environment.' . PHP_EOL);
$output->writeln('<comment>ATTENTION</comment>: This operation should not be executed in a production environment.' . PHP_EOL);

if ($isFullDatabaseDrop) {
$sqls = $schemaTool->getDropDatabaseSQL();
Expand All @@ -115,8 +115,11 @@ protected function executeSchemaCommand(InputInterface $input, OutputInterface $
}

if (count($sqls)) {
$output->writeln('Schema-Tool would execute ' . count($sqls) . ' queries to drop the database.');
$output->writeln('Please run the operation with --force to execute these queries or use --dump-sql to see them.');
$output->writeln(sprintf('The Schema-Tool would execute <info>"%s"</info> queries to update the database.', count($sqls)));
$output->writeln('Please run the operation by passing one - or both - of the following options:');

$output->writeln(sprintf(' <info>%s --force</info> to execute the command', $this->getName()));
$output->writeln(sprintf(' <info>%s --dump-sql</info> to dump the SQL statements to the screen', $this->getName()));

return 1;
}
Expand Down

0 comments on commit 4bc8f7b

Please sign in to comment.