yii\console\controllers\BaseMigrateController::migrateToTime PHP Method

migrateToTime() protected method

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