protected function runMigrationByApplication($command)
    {
        $app = $this->mockApplication();

        list($migrateController, $route) = $app->createController('migrate');

        if ($migrateController === null) {
            throw new ExtensionException(
              __CLASS__,
              "At least one of `migrationPath` or `migrationNamespaces` should be specified.\nOr describe migrations in your app config."
            );
        }

        if ($migrateController->interactive) {
            $this->writeln('Cannot run the migrate interactively, the interaction was disabled.');
            $migrateController->interactive = false;
        }

        $this->runMigration($migrateController, $command);

        $this->destroyApplication();
    }
protected function runMigrationByApplication($command)
    {
        $app = $this->mockApplication();

        list($migrateController, $route) = $app->createController('migrate');

        if ($migrateController === null) {
            throw new ExtensionException(
              __CLASS__,
              "At least one of `migrationPath` or `migrationNamespaces` should be specified.\nOr describe migrations in your app config."
            );
        }

        if ($migrateController->interactive) {
            $this->writeln('Cannot run the migrate interactively, the interaction was disabled.');
            $migrateController->interactive = false;
        }

        $this->runMigration($migrateController, $command);

        $this->destroyApplication();
    }
protected function runMigrationByApplication ( $ command ) { $ app = $ this -> mockApplication ( ) ; list ( $ migrateController , $ route ) = $ app -> createController ( 'migrate' ) ; if ( $ migrateController === null ) { throw new ExtensionException ( __CLASS__ , "At least one of `migrationPath` or `migrationNamespaces` should be specified.\nOr describe migrations in your app config." ) ; } if ( $ migrateController -> interactive ) { $ this -> writeln ( 'Cannot run the migrate interactively, the interaction was disabled.' ) ; $ migrateController -> interactive = false ; } $ this -> runMigration ( $ migrateController , $ command ) ; $ this -> destroyApplication ( ) ; }
Run migration from app config
@param string $command either `up` or `down`
Run migration from app config