Class MigratorAbstract

Manages single-run patches/migrations.

Hierarchy

Constructors

Properties

bus: Bus<Event>
injector: Container
migrations: Migrations

Methods

  • Protected

    Given a list of migration identifiers, filter out those that have been applied.

    Parameters

    • identifiers: string[]

    Returns Promise<string[]>

  • Protected

    Given a list of migration identifiers, filter out those that have not been applied.

    Parameters

    • identifiers: string[]

    Returns Promise<string[]>

  • Protected

    Get all registered migrations, by their string-form identifiers.

    Returns string[]

  • Apply pending migrations.

    If identifiers are specified, only the pending migrations with those identifiers are applied. If none are specified, all pending migrations will be applied.

    Parameters

    • Optional identifiers: string[]

    Returns Promise<void>

  • Rollback applied migrations.

    If specified, only applied migrations with the given identifiers will be rolled back. If not specified, then the last "batch" of applied migrations will be rolled back.

    Parameters

    • Optional identifiers: string[]

    Returns Promise<void>