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

createMigration() protected method

Creates a new migration instance.
protected createMigration ( string $class ) : yii\db\MigrationInterface
$class string the migration class name
return yii\db\MigrationInterface the migration instance
    protected function createMigration($class)
    {
        $class = trim($class, '\\');
        if (strpos($class, '\\') === false) {
            $file = $this->migrationPath . DIRECTORY_SEPARATOR . $class . '.php';
            require_once $file;
        }
        return new $class();
    }