protected function migrateToTime(RequestApplicationInterface $app, $time)
    {
        return $this->getMigrationHistory(null)->then(
            function($migrations) use ($app, $time) {
                $migrations = array_values($migrations);
                $count = 0;
                while ($count < count($migrations) && $migrations[$count] > $time) {
                    ++$count;
                }
                if ($count === 0) {
                    $this->stdout("Nothing needs to be done.\n", Console::FG_GREEN);
                } else {
                    return $this->actionDown($app, $count);
                }
                return reject(new Exception("Nothing needs to be done"));
            }
        );
    }
protected function migrateToTime(RequestApplicationInterface $app, $time)
    {
        return $this->getMigrationHistory(null)->then(
            function($migrations) use ($app, $time) {
                $migrations = array_values($migrations);
                $count = 0;
                while ($count < count($migrations) && $migrations[$count] > $time) {
                    ++$count;
                }
                if ($count === 0) {
                    $this->stdout("Nothing needs to be done.\n", Console::FG_GREEN);
                } else {
                    return $this->actionDown($app, $count);
                }
                return reject(new Exception("Nothing needs to be done"));
            }
        );
    }
protected function migrateToTime ( RequestApplicationInterface $ app , $ time ) { return $ this -> getMigrationHistory ( null ) -> then ( function ( $ migrations ) use ( $ app , $ time ) { $ migrations = array_values ( $ migrations ) ; $ count = 0 ; while ( $ count < count ( $ migrations ) && $ migrations [ $ count ] > $ time ) { ++ $ count ; } if ( $ count === 0 ) { $ this -> stdout ( "Nothing needs to be done.\n" , Console :: FG_GREEN ) ; } else { return $ this -> actionDown ( $ app , $ count ) ; } return reject ( new Exception ( "Nothing needs to be done" ) ) ; } ) ; }
Migrates to the specified apply time in the past.
@param RequestApplicationInterface $app
@param int                         $time UNIX timestamp value.
@return ExtendedPromiseInterface
Migrates to the specified apply time in the past .