/**
  * @see Command
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     if ($input->getOption('re-create')) {
         $input->setOption('drop', true);
         $input->setOption('create', true);
     }
     if (!$input->getOption('drop') && !$input->getOption('create')) {
         throw new \InvalidArgumentException('You must specify one of the --drop and --create options or both.');
     }
     $found = false;
     $connections = $this->getDoctrineConnections();
     foreach ($connections as $name => $connection) {
         if ($input->getOption('connection') && $name != $input->getOption('connection')) {
             continue;
         }
         if ($input->getOption('drop')) {
             $this->dropDatabaseForConnection($connection, $output);
         }
         if ($input->getOption('create')) {
             $this->createDatabaseForConnection($connection, $output);
         }
         $found = true;
     }
     if ($found === false) {
         if ($input->getOption('connection')) {
             throw new \InvalidArgumentException(sprintf('<error>Could not find a connection named <comment>%s</comment></error>', $input->getOption('connection')));
         } else {
             throw new \InvalidArgumentException(sprintf('<error>Could not find any configured connections</error>', $input->getOption('connection')));
         }
     }
 }