public function migrateCommand(string $version = null, string $output = null, bool $dryRun = false, bool $quiet = 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 {
            $result = $this->doctrineService->executeMigrations($version, $output, $dryRun, $quiet);
            if ($result === '') {
                if (!$quiet) {
                    $this->outputLine('No migration was necessary.');
                }
            } elseif ($output === null) {
                $this->outputLine($result);
            } else {
                if (!$quiet) {
                    $this->outputLine('Wrote migration SQL to file "' . $output . '".');
                }
            }

            $this->emitAfterDatabaseMigration();
        } catch (\Exception $exception) {
            $this->handleException($exception);
        }
    }