     counts
 
 class globals.Document.RemoveFieldsMigration extends globals.Document.MajorMigration
-  # Fields is an object
+  # Fields is an object.
   constructor: (fields) ->
     super()
 

      newSchema = semver.inc currentSchema, 'major'

    if i < migrationsPending and migration instanceof @_RenameCollectionMigration
      # We skip all already done rename migrations (but we run other old migrations again, just with the last known collection name)
      currentSchema = newSchema
      currentName = migration.newName
      continue

    ).fetch()

    if migrations[0]
      throw new Error "Unexpected migration recorded: #{util.inspect migrations[0], depth: 10}" if migrationsPending < Number.POSITIVE_INFINITY

      if migrations[0].migrationName is migration.name and migrations[0].oldCollectionName is currentName and migrations[0].newCollectionName is newName and migrations[0].oldVersion is currentSchema and migrations[0].newVersion is newSchema
        currentSerial = migrations[0].serial
      else
        throw new Error "Inconsistent migration recorded, expected migrationName='#{migration.name}', oldCollectionName='#{currentName}', newCollectionName='#{newName}', oldVersion='#{currentSchema}', newVersion='#{newSchema}', got: #{util.inspect migrations[0], depth: 10}"
    else if migrationsPending is Number.POSITIVE_INFINITY
      # This is the collection name recorded as the last, so we start with it.
      initialName = currentName
      migrationsPending = i

