Options
All
  • Public
  • Public/Protected
  • All
Menu

Executes migrations: runs pending and reverts previously executed migrations.

Hierarchy

  • MigrationExecutor

Index

Constructors

constructor

Properties

Protected connection

connection: Connection

Private migrationsTable

migrationsTable: string

Private migrationsTableName

migrationsTableName: string

Protected Optional queryRunner

queryRunner: QueryRunner

transaction

transaction: boolean = true

Indicates if migrations must be executed in a transaction.

Methods

Protected createMigrationsTableIfNotExist

  • createMigrationsTableIfNotExist(queryRunner: QueryRunner): Promise<void>

Protected deleteExecutedMigration

executePendingMigrations

  • executePendingMigrations(): Promise<void>
  • Executes all pending migrations. Pending migrations are migrations that are not yet executed, thus not saved in the database.

    Returns Promise<void>

Protected getLatestExecutedMigration

Protected getLatestTimestampMigration

Protected getMigrations

Protected insertExecutedMigration

Protected loadExecutedMigrations

undoLastMigration

  • undoLastMigration(): Promise<void>

Generated using TypeDoc