Fix error message for missing migration files (#4937)

This commit is contained in:
Victor Pontis 2022-01-17 03:56:15 -05:00 committed by GitHub
parent a6d26ad1aa
commit e171d61dad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -562,8 +562,9 @@ function validateMigrationList(migrationSource, migrations) {
const [all, completed] = migrations;
const diff = getMissingMigrations(migrationSource, completed, all);
if (!isEmpty(diff)) {
const names = diff.map((d) => d.name);
throw new Error(
`The migration directory is corrupt, the following files are missing: ${diff.join(
`The migration directory is corrupt, the following files are missing: ${names.join(
', '
)}`
);