protected function execute(InputInterface $input, OutputInterface $output)
{
$this->detectDbSettings($output);
$dialog = $this->getHelper('dialog');
$dbHelper = $this->getHelper('database');
if ($input->getOption('force')) {
$shouldDrop = true;
} else {
$shouldDrop = $dialog->askConfirmation($output, '<question>Really drop database ' . $this->dbSettings['dbname'] . ' ?</question> <comment>[n]</comment>: ', false);
}
if ($shouldDrop) {
if ($input->getOption('tables')) {
$dbHelper->dropTables($output);
} else {
$dbHelper->dropDatabase($output);
}
}
}