[command] Fixed output + test if file exists in data-sql command
This commit is contained in:
parent
7a2d43a1e9
commit
42b7937442
1 changed files with 5 additions and 1 deletions
|
|
@ -47,6 +47,10 @@ EOT
|
|||
|
||||
$filesystem = new Filesystem();
|
||||
|
||||
if (!is_dir($xmlDumpDir)) {
|
||||
$filesystem->mkdir($xmlDumpDir);
|
||||
}
|
||||
|
||||
$finder = new Finder();
|
||||
foreach($finder->name('*_data.xml')->in($xmlDumpDir) as $data) {
|
||||
$filesystem->copy((string) $data, $schemaDir . $data->getFilename());
|
||||
|
|
@ -62,7 +66,7 @@ EOT
|
|||
$filesystem->remove($data);
|
||||
}
|
||||
|
||||
$this->summary($output, 'propel-data-sql');
|
||||
$this->writeSummary($output, 'propel-data-sql');
|
||||
$output->writeln(sprintf('SQL from XML data dump file is in <comment>%s</comment>.', $sqlDir));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue