*/
class UpdateCommand extends ContainerAwareCommand
{
protected function configure()
{
$this
->setName('thelia:update')
->setDescription('update your database. Before that you have to update all your files')
;
}
public function execute(InputInterface $input, OutputInterface $output)
{
$output->writeln(array(
'',
'Welcome to the update database process',
'Please wait ...'
));
$update = new Update();
try {
$update->process();
$output->writeln(array(
'',
'Your database is updated successfully !',
''
));
} catch (PropelException $e) {
$output->writeln(array(
'',
sprintf('Error during update process with message : %s', $e->getMessage()),
''
));
} catch (UpToDateException $e) {
$output->writeln(array(
'',
sprintf('%s', $e->getMessage()),
''
));
}
}
}