       $rename: {}
 
     for from, to of @fields
-      # Reversed
+      # Reversed.
       update.$rename[to] = from
 
     count = collection.update {_schema: currentSchema}, update, {multi: true}

          migrated: counts.migrated
          all: counts.all
      ,
        multi: true # To catch any errors

      throw new Error "Incosistent migration record state, missing migrationName='#{ migration.name }', oldCollectionName='#{ currentName }', newCollectionName='#{ newName }', oldVersion='#{ currentSchema }', newVersion='#{ newSchema }'" unless count is 1
    else
      count = globals.Document.Migrations.find(
        migrationName: migration.name


    if globals.Document.migrationsDisabled
      # Migrations are disabled but we are still running
      # the code just to compute the latest schema version.
      currentSchema = newSchema
      currentName = newName
      continue
