UNPKG

typeorm

Version:

Data-Mapper ORM for TypeScript, ES7, ES6, ES5. Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, MongoDB databases.

26 lines (25 loc) 807 B
import { QueryRunner } from "../query-runner/QueryRunner"; /** * Migrations should implement this interface and all its methods. */ export interface MigrationInterface { /** * Optional migration name, defaults to class name. */ name?: string; /** * Optional flag to determine whether to run the migration in a transaction or not. * Can only be used when `migrationsTransactionMode` is either "each" or "none" * Defaults to `true` when `migrationsTransactionMode` is "each" * Defaults to `false` when `migrationsTransactionMode` is "none" */ transaction?: boolean; /** * Run the migrations. */ up(queryRunner: QueryRunner): Promise<any>; /** * Reverse the migrations. */ down(queryRunner: QueryRunner): Promise<any>; }