Put the generated file in app/propel (ReverseCommand)

This commit is contained in:
William DURAND 2011-03-25 18:58:42 +01:00
commit 95bfaf002f

View file

@ -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 <info>app/propel/autogenerated_schema.xml</info>.');
}
}