Commit 3018a9e9 authored by jwage's avatar jwage

fixes #692

parent e44bdb8e
......@@ -34,16 +34,18 @@ class Doctrine_Task_DropDb extends Doctrine_Task
{
public $description = 'Drop database for all existing connections',
$requiredArguments = array(),
$optionalArguments = array();
$optionalArguments = array('force' => 'Whether or not to force the drop database task');
public function execute()
{
$answer = $this->ask('Are you sure you wish to drop your databases? (y/n)');
if ($answer != 'y') {
$this->notify('Successfully cancelled');
return;
if ( ! $this->getArgument('force')) {
$answer = $this->ask('Are you sure you wish to drop your databases? (y/n)');
if ($answer != 'y') {
$this->notify('Successfully cancelled');
return;
}
}
$results = Doctrine::dropDatabases();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment