Migrate all plugins to up.

@param Event $event
342922
public static function migrateUp(Event $event)
    {
        $dir = self::getRootDir().'DoctrineMigrations';
        if (self::isHaveMigrations($dir)) {
            self::repackMigrations($dir);
            self::executeCommand('doctrine:migrations:migrate --no-interaction', $event->getIO());
        }
    }
338624
protected function start(Event $event): void
    {
        // if sendOutputTo or appendOutputTo have been specified
        if (!$event->nullOutput()) {
            // if sendOutputTo then truncate the log file if it exists
            if (!$event->shouldAppendOutput) {
                $f = @\fopen($event->output, 'r+');
                if (false !== $f) {
                    \ftruncate($f, 0);
                    \fclose($f);
                }
            }
            // Create an instance of the Logger specific to the event
            $event->logger = $this->loggerFactory->create(
                [
                    // Logging streams
                    'info' => $event->output,
                ]
            );
        }

        $this->consoleLogger
            ->debug("Invoke Event's ping before.");

        $this->pingBefore($event);

        // Running the before-callbacks
        $event->outputStream = ($this->invoke($event->beforeCallbacks()));
        $event->start();
    }
881075
public function solveAssets(Event $event)
    {
        $this->solver->setUpdatable(false !== strpos($event->getName(), 'update'));
        $this->solver->solve($event->getComposer(), $event->getIO());
    }
1161509
private function mutate($event)
    {
        $method = 'on' . (string) new EventName($event);

        if (method_exists($this, $method)) {
            $this->$method($event);
        } else {
            throw new \RuntimeException(sprintf('Method %s does not exist on aggregate %s', $method, get_class($this)));
        }
    }
192185
public static function Go(Event $event)
    {
        $event->getIO()->writeError('<info>Updating .gitignore: </info>', false);

        $composer = $event->getComposer();
        $repositoryManager = $composer->getRepositoryManager();
        $installManager = $composer->getInstallationManager();
        $extraConfiguration = $composer->getPackage()->getExtra();

        // Check in composer extra configuration if devOnly option is set
        $devRequires = (array_key_exists('autogitignore', $extraConfiguration)
            && $extraConfiguration['autogitignore'] == 'devOnly');

        // If devOnly option is set
        if ($devRequires) {
            // Grab original list of all require-dev packages
            $devRequires = array_keys($composer->getPackage()->getDevRequires());
            // Grab original list of all require packages
            $requires = array_keys($composer->getPackage()->getRequires());

            // Grab recursively require and require-dev packages
            foreach ($repositoryManager->getLocalRepository()->getPackages() as $package) {
                $devRequires = array_merge($devRequires, array_keys($package->getDevRequires()));
                $requires = array_merge($requires, array_keys($package->getRequires()));
            }

            // Remove duplicates
            $devRequires = array_unique($devRequires);
            $requires = array_unique($requires);

            // Sort packages
            sort($devRequires);
            sort($requires);
        }

        $packages = array();
        foreach ($repositoryManager->getLocalRepository()->getPackages() as $package) {
            // Test if we need to ignore the package
            // If the option devOnly is set, we check that
            // the package is not in the list of require-dev
            // OR is set in the list of require packages
            // before skipping.
            if ($devRequires && (!in_array($package->getName(), $devRequires) || in_array($package->getName(), $requires))) {
                continue;
            }
            $path = $installManager->getInstallPath($package);
            $packages[] = '/' . preg_replace('~^' . preg_quote(str_replace('\\', '/', getcwd()) . '/') . '~', '', str_replace('\\', '/', realpath($path))) . '/';
        }

        $packages = array_unique($packages);
        sort($packages);

        try {
            $gitIgnoreFile = GitIgnoreFile::create(getcwd() . DIRECTORY_SEPARATOR . '.gitignore');
            $gitIgnoreFile->setLines($packages);
            $gitIgnoreFile->save();
        } catch (Exception $exception) {
            $event->getIO()->writeError('<info>Failed - ' . $exception->getMessage() . '</info>');

            return false;
        }

        $event->getIO()->writeError('<info>Done - ' . count($packages) . ' packages ignored.</info>');

        return true;
    }
457897
public static function migratePackage(PackageEvent $event)
    {
        self::addJobByOperationType(
            $event->getOperation(),
            function ($package) {
                return new UpMigrate($package);
            },
            function ($package) {
                return new DownMigrate($package);
            }
        );
    }
181925
public function postOperation(Event $event)
    {
        $this->refreshPatchCollection();
        $patchCollection = $this->getPatchCollection();
        if ($patchCollection->isEmpty()) {
            $this->io->write('<info>No patches supplied.</info>');

            return;
        }
        $packages = $this->getLocalRepositoryPackages();
        foreach ($packages as $package) {
            if ($this->mustInstallPatchesForPackage($package)) {
                $this->installPatchesForPackage($package);
            }
        }
    }
336022
public function migrateUp()
    {
        $this->builder->create(
            $this->table,
            function ($table) {
                $table->bigIncrements('id');

                $table->bigInteger('domain_id')->unsigned()->index();
                $table->string('url')->index();
                $table->string('host');

                $table->timestamps();
                $table->index('created_at');
                $table->index('updated_at');
            }
        );
    }
519201
public function send(Event $event)
    {
        $message = $this->getEventMessage($event);
        $this->flush($message);
    }
849042
public function apply($event): void
    {
        $this->handleRecursively($event);

        ++$this->playhead;
        $this->uncommittedEvents[] = DomainMessage::recordNow(
            $this->getAggregateRootId(),
            $this->playhead,
            new Metadata([]),
            $event
        );
    }
745720
public function startup(Event $Event) {
		$Controller = $Event->subject();
		$this->Controller = $Controller;
		if (!empty($this->_config['actions'])) {
			if (in_array($this->Controlle->action, $this->_config['actions'])) {
				if ($this->_config['checkHash'] === true) {
					$this->checkHash();
				}
				$this->unpackParams();
			}
		}
	}
1282737
public function execUp(string $name): void{
        DB::connection('default')->table('migrations')->insert(['name' => $name]);
        $this->up();
    }
410455
public function handle(JobsMigrated $event)
    {
        $this->jobs->migrated($event->connectionName, $event->queue, $event->payloads);
    }
735563
public static function jumpstart(Event $event)
    {
        // get information
        $info = static::questionnaire($event);

        // update file headers
        $files = new \AppendIterator();
        $files->append(
            new RegexIterator(
                new RecursiveDirectoryIterator('.'),
                static::$filePattern,
                RegexIterator::GET_MATCH
            )
        );
        $files->append(
            new RegexIterator(
                new RecursiveIteratorIterator(new RecursiveDirectoryIterator('src')),
                static::$filePattern,
                RegexIterator::GET_MATCH
            )
        );
        static::updateFiles($event, $files, $info);

        // create composer.json
        static::mergeConfig($event, $info);
    }
816510
public function put(EventInterface $event) {
        $request = $event->getRequest();
        $metadata = json_decode($request->getContent(), true);

        $event->getManager()
            ->trigger('db.metadata.delete')
            ->trigger('db.metadata.update', [
                'metadata' => $metadata,
            ]);

        $model = new Model\Metadata();
        $model->setData($metadata);

        $event->getResponse()->setModel($model);
    }
663212
protected function migrateUp(MigrationInterface $migration)
    {
        echo "\nm_".$migration->getTime()." ... ";
        $migration->up();
        $this->createManager($migration->getConnection())->completeUp($migration);
        echo "OK";
    }
673552
public function onControllerSetup(Event $event)
    {
        /** @var AppController $controller */
        $controller = $event->getSubject();
        $isAdmin    = ($controller->request->getParam('prefix') === 'admin');

        $plugins = Plugin::loaded();
        foreach ($plugins as $plugin) {
            $path     = Plugin::path($plugin);
            $menuFile = ($isAdmin) ? 'admin_menu' : 'menu';
            $navConf  = $path . 'config/' . $menuFile . '.php';

            if (FS::isFile($navConf)) {
                /** @noinspection PhpIncludeInspection */
                require_once $navConf;
            }
        }
    }