yii\console\controllers\BaseMigrateController::migrateDown PHP 메소드

migrateDown() 보호된 메소드

Downgrades with the specified migration class.
protected migrateDown ( string $class ) : boolean
$class string the migration class name
리턴 boolean whether the migration is successful
    protected function migrateDown($class)
    {
        if ($class === self::BASE_MIGRATION) {
            return true;
        }
        $this->stdout("*** reverting {$class}\n", Console::FG_YELLOW);
        $start = microtime(true);
        $migration = $this->createMigration($class);
        if ($migration->down() !== false) {
            $this->removeMigrationHistory($class);
            $time = microtime(true) - $start;
            $this->stdout("*** reverted {$class} (time: " . sprintf('%.3f', $time) . "s)\n\n", Console::FG_GREEN);
            return true;
        } else {
            $time = microtime(true) - $start;
            $this->stdout("*** failed to revert {$class} (time: " . sprintf('%.3f', $time) . "s)\n\n", Console::FG_RED);
            return false;
        }
    }