public function migrateTask(Option $option)
    {
        $databases = $this->getDatabases($option);

        $start = microtime(true);
        foreach ($databases as $alias => $database) {
            $manager = $this->getManager($alias, $database);
            $manager->migrate($this->application->getEnv(), $option->getArg(0));
        }
        $end = microtime(true);

        $this->sendMessage('');
        $this->sendMessage('All Done. Took %.4fs', $end - $start);

        $this->task('db:schema:dump', $option->copy());
    }
public function migrateTask(Option $option)
    {
        $databases = $this->getDatabases($option);

        $start = microtime(true);
        foreach ($databases as $alias => $database) {
            $manager = $this->getManager($alias, $database);
            $manager->migrate($this->application->getEnv(), $option->getArg(0));
        }
        $end = microtime(true);

        $this->sendMessage('');
        $this->sendMessage('All Done. Took %.4fs', $end - $start);

        $this->task('db:schema:dump', $option->copy());
    }
public function migrateTask ( Option $ option ) { $ databases = $ this -> getDatabases ( $ option ) ; $ start = microtime ( true ) ; foreach ( $ databases as $ alias => $ database ) { $ manager = $ this -> getManager ( $ alias , $ database ) ; $ manager -> migrate ( $ this -> application -> getEnv ( ) , $ option -> getArg ( 0 ) ) ; } $ end = microtime ( true ) ; $ this -> sendMessage ( '' ) ; $ this -> sendMessage ( 'All Done. Took %.4fs' , $ end - $ start ) ; $ this -> task ( 'db:schema:dump' , $ option -> copy ( ) ) ; }
database migration task. using phinx.

usage:
$ ./app db:migrate [version]

@option      database,d=all      target database (default is all databases).
database migration task . using phinx .