diff --git a/Command/InstallCommand.php b/Command/InstallCommand.php index 479cc5f..10fc4b5 100644 --- a/Command/InstallCommand.php +++ b/Command/InstallCommand.php @@ -42,6 +42,9 @@ public function execute(InputInterface $input, OutputInterface $output) if ($this->getConfigurationManager()->isPhpcrEnabled()) { $this->installPhpcr(); } + if ($this->getConfigurationManager()->isMigrationEnabled()) { + $this->installMigration(); + } } /** @@ -83,4 +86,23 @@ protected function installPhpcr() $this->log('Install PHPCR done..'); } + + /** + * Set all migration as executed + */ + protected function installMigration() + { + $this->log('Set all migration as executed ..'); + + $application = $this->getApplication(); + $commandInput = new ArrayInput(array( + 'command' => 'doctrine:migration:version', + '--add' => true, + '--all' => true, + '--no-interaction' => true + )); + $application->doRun($commandInput, $this->output); + + $this->log('Set all migration as executed done..'); + } }