fix(reporters): show number of skipped migrations correctly in command output
This commit is contained in:
parent
69bd88afdb
commit
ef45be9233
4 changed files with 33 additions and 23 deletions
|
|
@ -50,7 +50,6 @@ export const migrationRunner = async <T extends MigrationMetadata | MigrationMet
|
|||
onError,
|
||||
migrationFilter = () => true,
|
||||
}: MigrationRunnerParameters<T>): Promise<Error | undefined> => {
|
||||
const collectedMigrations: Array<MigrationMetadata | MigrationMetadataFinished> = [];
|
||||
const validatedMigrations: Array<MigrationMetadata | MigrationMetadataFinished> = [];
|
||||
const migrationsToLock: MigrationMetadata[] = [];
|
||||
|
||||
|
|
@ -93,8 +92,6 @@ export const migrationRunner = async <T extends MigrationMetadata | MigrationMet
|
|||
continue;
|
||||
}
|
||||
|
||||
collectedMigrations.push(migration);
|
||||
|
||||
if (isFinishedMigration(migration)) {
|
||||
skip ||= migration.status === 'failed' || migration.status === 'skipped';
|
||||
|
||||
|
|
@ -138,7 +135,7 @@ export const migrationRunner = async <T extends MigrationMetadata | MigrationMet
|
|||
}
|
||||
}
|
||||
|
||||
await reporter.onCollectedMigrations?.(collectedMigrations);
|
||||
await reporter.onCollectedMigrations?.(validatedMigrations);
|
||||
|
||||
let optionError: Error | undefined;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue