diff --git a/Command/ReverseCommand.php b/Command/ReverseCommand.php index 217df6d..dc1c40e 100644 --- a/Command/ReverseCommand.php +++ b/Command/ReverseCommand.php @@ -6,6 +6,8 @@ use Propel\PropelBundle\Command\PhingCommand; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Finder\Finder; +use Symfony\Bundle\FrameworkBundle\Util\Filesystem; /* * This file is part of the Symfony framework. @@ -70,5 +72,10 @@ EOT 'propel.database.user' => $defaultConfig['connection']['user'], 'propel.database.password' => $defaultConfig['connection']['password'], )); + + $filesystem = new Filesystem(); + $filesystem->copy($this->getTmpDir().'/schema.xml', $this->getApplication()->getKernel()->getRootDir() . '/propel/autogenerated_schema.xml'); + + $output->writeln('Generated schema is app/propel/autogenerated_schema.xml.'); } }