1
0
mirror of synced 2025-02-20 14:13:15 +03:00

[DDC-1616] Removed non-SQL message and improve exportability of SchemaTool CreateCommand.

This commit is contained in:
Guilherme Blanco 2012-02-22 01:19:01 -05:00
parent 55a9e1e90c
commit 48dcee9d60

View File

@ -65,12 +65,12 @@ EOT
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);