diff --git a/application/clicommands/MigrateCommand.php b/application/clicommands/MigrateCommand.php new file mode 100644 index 00000000..10290cb7 --- /dev/null +++ b/application/clicommands/MigrateCommand.php @@ -0,0 +1,32 @@ + + * + * OPTIONS + * + * --author= + * An Icinga Web 2 user used to mark as an author for all the migrated jobs. + */ + public function jobsAction() + { + $author = $this->params->getRequired('author'); + Auth::getInstance()->getUser()->setUsername($author); + + Migration::migrateJobs($this->getDb()); + } +}