Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MigrationExecutor

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<Migration[]>

Protected getLatestExecutedMigration

Protected getLatestTimestampMigration

Protected getMigrations

Protected insertExecutedMigration

Protected loadExecutedMigrations

undoLastMigration

  • undoLastMigration(): Promise<void>

Generated using TypeDoc