/** * Show the current migration status * * Displays the migration configuration as well as the number of * available, executed and pending migrations. * * @return void * @see typo3.flow:doctrine:migrate * @see typo3.flow:doctrine:migrationexecute * @see typo3.flow:doctrine:migrationgenerate * @see typo3.flow:doctrine:migrationversion */ public function migrationStatusCommand() { // "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) { $this->outputLine($this->doctrineService->getMigrationStatus()); } else { $this->outputLine('Doctrine migration status not available, the driver and host backend options are not set in /Configuration/Settings.yaml.'); $this->quit(1); } }
/** * Show the current migration status * * Displays the migration configuration as well as the number of * available, executed and pending migrations. * * @param boolean $showMigrations Output a list of all migrations and their status * @param boolean $showDescriptions Show descriptions for the migrations (enables versions display) * @return void * @see typo3.flow:doctrine:migrate * @see typo3.flow:doctrine:migrationexecute * @see typo3.flow:doctrine:migrationgenerate * @see typo3.flow:doctrine:migrationversion */ public function migrationStatusCommand($showMigrations = false, $showDescriptions = false) { if (!$this->isDatabaseConfigured()) { $this->outputLine('Doctrine migration status not available, the driver and host backend options are not set in /Configuration/Settings.yaml.'); $this->quit(1); } if ($showDescriptions) { $showMigrations = true; } $this->outputLine($this->doctrineService->getMigrationStatus($showMigrations, $showDescriptions)); }