Skip to content

Instantly share code, notes, and snippets.

@pborreli
Created September 16, 2010 11:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pborreli/582306 to your computer and use it in GitHub Desktop.
Save pborreli/582306 to your computer and use it in GitHub Desktop.
force drop of one specific database symfony
<?php
class ProjectConfiguration extends sfProjectConfiguration
{
public function setup()
{
$this->dispatcher->connect('command.filter_options', array($this, 'filterCommandOptions'));
}
/**
* Filters command options.
*
* @param sfEvent $event
* @param array $options
*
* @return array
*/
public function filterCommandOptions(sfEvent $event, $options) {
if ('sfDoctrineDropDbTask' === get_class($event->getSubject()))
{
$options = array('name_of_the_database_you_want_to_drop');
}
return $options;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment