code: function validateMigrationList(migrationSource, migrations) {
    const all = migrations[0];
    const completed = migrations[1];
    const diff = getMissingMigrations(migrationSource, completed, all);
    if (!isEmpty(diff)) {
      throw new Error(
        `The migration directory is corrupt, the following files are missing: ${diff.join(
          ', '
        )}`
      );
    }
  }
docs: Validates that migrations are present in the appropriate directories.