/**
* Execute a single migration
*
* Manually runs a single migration in the given direction.
*
* @param string $version The migration to execute
* @param string $direction Whether to execute the migration up (default) or down
* @param string $output A file to write SQL to, instead of executing it
* @param boolean $dryRun Whether to do a dry run or not
* @return void
* @see neos.flow:doctrine:migrate
* @see neos.flow:doctrine:migrationstatus
* @see neos.flow:doctrine:migrationgenerate
* @see neos.flow:doctrine:migrationversion
*/
public function migrationExecuteCommand($version, $direction = 'up', $output = null, $dryRun = 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);
}
try {
$this->outputLine($this->doctrineService->executeMigration($version, $direction, $output, $dryRun));
} catch (\Exception $exception) {
$this->handleException($exception);
}
}