API 参考
    正在准备搜索索引...

    Migrations should implement this interface and all its methods.

    interface MigrationInterface {
        name?: string;
        transaction?: boolean;
        down(queryRunner: QueryRunner): Promise<any>;
        up(queryRunner: QueryRunner): Promise<any>;
    }
    索引

    属性

    方法

    属性

    name?: string

    Optional migration name, defaults to class name.

    transaction?: boolean

    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"

    方法

    • Reverse the migrations.

      参数

      返回 Promise<any>

    • Run the migrations.

      参数

      返回 Promise<any>