yupe\components\Migrator::migrateUp PHP Метод

migrateUp() защищенный Метод

Обновляем миграцию:
protected migrateUp ( string $module, string $class ) : boolean
$module string - required module
$class string - name of migration class
Результат boolean is updated to migration
    protected function migrateUp($module, $class)
    {
        $db = $this->getDbConnection();
        ob_start();
        ob_implicit_flush(false);
        echo Yii::t('YupeModule.yupe', "Checking migration {class}", ['{class}' => $class]);
        Yii::app()->getCache()->clear('getMigrationHistory');
        $start = microtime(true);
        $migration = $this->instantiateMigration($module, $class);
        // Вставляем запись о начале миграции
        $db->createCommand()->insert($db->tablePrefix . $this->migrationTable, ['version' => $class, 'module' => $module, 'apply_time' => 0]);
        $result = $migration->up();
        Yii::log($msg = ob_get_clean());
        if ($result !== false) {
            // Проставляем "установлено"
            $db->createCommand()->update($db->tablePrefix . $this->migrationTable, ['apply_time' => time()], "version = :ver AND module = :mod", [':ver' => $class, 'mod' => $module]);
            $time = microtime(true) - $start;
            Yii::log(Yii::t('YupeModule.yupe', "Migration {class} applied for {s} seconds.", ['{class}' => $class, '{s}' => sprintf("%.3f", $time)]));
        } else {
            $time = microtime(true) - $start;
            Yii::log(Yii::t('YupeModule.yupe', "Error when running {class} ({s} seconds.)", ['{class}' => $class, '{s}' => sprintf("%.3f", $time)]));
            throw new CException(Yii::t('YupeModule.yupe', 'Error was found when installing: {error}', ['{error}' => $msg]));
        }
    }