[umzug] fix: support array of migrations as input (#41878)

* fix: support array of migrations as input

* fix: add missing methods to Migration interface

* fix: remove unnecessary props

* fix: add file prop to Migration
This commit is contained in:
Julian Hundeloh 2020-02-04 17:35:58 +01:00 committed by GitHub
parent 00a3593da3
commit c848c5a881
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -174,7 +174,7 @@ declare namespace umzug {
/**
* Options for defined migration
*/
migrations?: MigrationOptions;
migrations?: MigrationOptions | Migration[];
}
@ -211,8 +211,12 @@ declare namespace umzug {
}
interface Migration {
path: string;
file: string;
migration(): Promise<any>;
up(): Promise<any>;
down(): Promise<any>;
testFileName(needle:string): boolean;
}
interface Umzug extends EventEmitter {