protected function execute(InputInterface $input, OutputInterface $output)
{
try {
$em = $this->getApplication()->getKernel()->getContainer()->getService('em');
$this->migrateData($em, $output);
$connection = $em->getConnection();
$connection->beginTransaction();
try {
$connection->query('SET FOREIGN_KEY_CHECKS=0');
$connection->query('DROP TABLE community_ticker_event');
$connection->query('SET FOREIGN_KEY_CHECKS=1');
$connection->commit();
$output->writeln('<info>Successfully removed. Finished!</info>');
} catch (\Exception $e) {
$connection->rollback();
$output->writeln('<error>Using rollback. Failed!</error>');
}
} catch (\Exception $e) {
throw new \Exception('Something went wrong!');
}
}