From c848c5a8817b8461148bc4df8efa6256eec38ba3 Mon Sep 17 00:00:00 2001 From: Julian Hundeloh Date: Tue, 4 Feb 2020 17:35:58 +0100 Subject: [PATCH] [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 --- types/umzug/index.d.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/types/umzug/index.d.ts b/types/umzug/index.d.ts index 91b01695c5..ddff4aa491 100644 --- a/types/umzug/index.d.ts +++ b/types/umzug/index.d.ts @@ -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; + up(): Promise; + down(): Promise; + testFileName(needle:string): boolean; } interface Umzug extends EventEmitter {