src/Console/Commands/Migrations/UpCommand.php
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->bootstrap($input, $output);

        $migrations = $this->getMigrations();
        $versions   = $this->getAdapter()->fetchAll();

        $version = $input->getArgument('version');

        if (in_array($version, $versions)) {
            $output->writeLn('<error>-Error!</error> "'.$version.'" migration status already active.');
            return;
        }

        if (!isset($migrations[$version])) {
            $output->writeLn('<error>-Error!</error> "'.$version.'" migration not found. Please check migration ID.');
            return;
        }

        $container = $this->getContainer();
        $container['phpmig.migrator']->up($migrations[$version]);
    }
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->bootstrap($input, $output);

        $migrations = $this->getMigrations();
        $versions   = $this->getAdapter()->fetchAll();

        $version = $input->getArgument('version');

        if (in_array($version, $versions)) {
            $output->writeLn('<error>-Error!</error> "'.$version.'" migration status already active.');
            return;
        }

        if (!isset($migrations[$version])) {
            $output->writeLn('<error>-Error!</error> "'.$version.'" migration not found. Please check migration ID.');
            return;
        }

        $container = $this->getContainer();
        $container['phpmig.migrator']->up($migrations[$version]);
    }
{@inheritdoc}