/**
  * Mark/unmark a migration as migrated
  *
  * If <u>all</u> is given as version, all available migrations are marked
  * as requested.
  *
  * @param string $version The migration to execute
  * @param boolean $add The migration to mark as migrated
  * @param boolean $delete The migration to mark as not migrated
  * @return void
  * @throws \InvalidArgumentException
  * @see typo3.flow:doctrine:migrate
  * @see typo3.flow:doctrine:migrationstatus
  * @see typo3.flow:doctrine:migrationexecute
  * @see typo3.flow:doctrine:migrationgenerate
  */
 public function migrationVersionCommand($version, $add = FALSE, $delete = FALSE)
 {
     // "driver" is used only for Doctrine, thus we (mis-)use it here
     // additionally, when no path is set, skip this step, assuming no DB is needed
     if ($this->settings['backendOptions']['driver'] !== NULL && $this->settings['backendOptions']['host'] !== NULL) {
         if ($add === FALSE && $delete === FALSE) {
             throw new \InvalidArgumentException('You must specify whether you want to --add or --delete the specified version.');
         }
         $this->doctrineService->markAsMigrated($version, $add ?: FALSE);
     } else {
         $this->outputLine('Doctrine migration not possible, the driver and host backend options are not set in /Configuration/Settings.yaml.');
         $this->quit(1);
     }
 }
 /**
  * Mark/unmark migrations as migrated
  *
  * If <u>all</u> is given as version, all available migrations are marked
  * as requested.
  *
  * @param string $version The migration to execute
  * @param boolean $add The migration to mark as migrated
  * @param boolean $delete The migration to mark as not migrated
  * @return void
  * @throws \InvalidArgumentException
  * @see typo3.flow:doctrine:migrate
  * @see typo3.flow:doctrine:migrationstatus
  * @see typo3.flow:doctrine:migrationexecute
  * @see typo3.flow:doctrine:migrationgenerate
  */
 public function migrationVersionCommand($version, $add = false, $delete = false)
 {
     if (!$this->isDatabaseConfigured()) {
         $this->outputLine('Doctrine migration not possible, the driver and host backend options are not set in /Configuration/Settings.yaml.');
         $this->quit(1);
     }
     if ($add === false && $delete === false) {
         throw new \InvalidArgumentException('You must specify whether you want to --add or --delete the specified version.');
     }
     try {
         $this->doctrineService->markAsMigrated($version, $add ?: false);
     } catch (MigrationException $exception) {
         $this->outputLine($exception->getMessage());
         $this->quit(1);
     }
 }
 /**
  * Mark/unmark a migration as migrated
  *
  * If <u>all</u> is given as version, all available migrations are marked
  * as requested.
  *
  * @param string $version The migration to execute
  * @param boolean $add The migration to mark as migrated
  * @param boolean $delete The migration to mark as not migrated
  * @return void
  * @throws \InvalidArgumentException
  * @see typo3.flow:doctrine:migrate
  * @see typo3.flow:doctrine:migrationstatus
  * @see typo3.flow:doctrine:migrationexecute
  * @see typo3.flow:doctrine:migrationgenerate
  */
 public function migrationVersionCommand($version, $add = false, $delete = false)
 {
     // "driver" is used only for Doctrine, thus we (mis-)use it here
     // additionally, when no path is set, skip this step, assuming no DB is needed
     if ($this->settings['backendOptions']['driver'] !== null && $this->settings['backendOptions']['host'] !== null) {
         if ($add === false && $delete === false) {
             throw new \InvalidArgumentException('You must specify whether you want to --add or --delete the specified version.');
         }
         try {
             $this->doctrineService->markAsMigrated($version, $add ?: false);
         } catch (\Doctrine\DBAL\Migrations\MigrationException $exception) {
             $this->outputLine($exception->getMessage());
             $this->quit(1);
         }
     } else {
         $this->outputLine('Doctrine migration not possible, the driver and host backend options are not set in /Configuration/Settings.yaml.');
         $this->quit(1);
     }
 }