Skip to content

Commit

Permalink
[DDC-1616] Removed non-SQL message and improve exportability of Schem…
Browse files Browse the repository at this point in the history
…aTool CreateCommand.
  • Loading branch information
guilhermeblanco committed Feb 22, 2012
1 parent 55a9e1e commit 48dcee9
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ protected function configure()

protected function executeSchemaCommand(InputInterface $input, OutputInterface $output, SchemaTool $schemaTool, array $metadatas)
{
$output->write('ATTENTION: This operation should not be executed in a production environment.' . PHP_EOL . PHP_EOL);

if ($input->getOption('dump-sql') === true) {
$sqls = $schemaTool->getCreateSchemaSql($metadatas);
$output->write(implode(';' . PHP_EOL, $sqls) . PHP_EOL);
$output->write(implode(';' . PHP_EOL, $sqls) . ';' . PHP_EOL);
} else {
$output->write('ATTENTION: This operation should not be executed in a production environment.' . PHP_EOL . PHP_EOL);

$output->write('Creating database schema...' . PHP_EOL);
$schemaTool->createSchema($metadatas);
$output->write('Database schema created successfully!' . PHP_EOL);
Expand Down

0 comments on commit 48dcee9

Please sign in to comment.