Member Junction
    Preparing search index...

    Phase D — Runs database migrations via the MemberJunction CLI.

    const migrate = new MigratePhase();
    const result = await migrate.Run({
    Dir: '/path/to/install',
    Config: { DatabaseHost: 'localhost' },
    Emitter: emitter,
    VersionTag: 'v5.9.0',
    });
    console.log(result.Success ? 'Migrations applied' : 'Migration failed');
    Index

    Constructors

    Methods

    Constructors

    Methods

    • Execute database migrations.

      The timeout defaults to DEFAULT_MIGRATE_TIMEOUT_MIN minutes and can be raised via the MJ_INSTALL_MIGRATE_TIMEOUT_MIN environment variable for slower environments (e.g., Docker SQL Server on Windows).

      Parameters

      • context: MigrateContext

        Migrate input with directory, config, and emitter.

      Returns Promise<MigrateResult>

      Migration result with success status and raw output.

      With code MIGRATE_TIMEOUT if migrations exceed the configured timeout (default: 30 minutes).

      With code MIGRATE_FAILED if the migration command exits non-zero.