         timestamp: new Date()
 
     if migration instanceof @_RenameCollectionMigration
-      Log.info "Renamed collection '#{ currentName }' to '#{ newName }'"
-      Log.info "Migrated #{ counts.migrated }/#{ counts.all } document(s) (from #{ currentSchema } to #{ newSchema }): #{ migration.name }" if counts.all
+      Log.info "Renamed collection '#{currentName}' to '#{newName}'"
+      Log.info "Migrated #{counts.migrated}/#{counts.all} document(s) (from #{currentSchema} to #{newSchema}): #{migration.name}" if counts.all
     else
-      Log.info "Migrated #{ counts.migrated }/#{ counts.all } document(s) in '#{ currentName }' collection (from #{ currentSchema } to #{ newSchema }): #{ migration.name }" if counts.all
+      Log.info "Migrated #{counts.migrated}/#{counts.all} document(s) in '#{currentName}' collection (from #{currentSchema} to #{newSchema}): #{migration.name}" if counts.all
 
     currentSchema = newSchema
     currentName = newName
 
-  # We do not check for not migrated documents if migrations are disabled
+  # We do not check for not migrated documents if migrations are disabled.
   unless globals.Document.migrationsDisabled
-    # For all those documents which lack schema information we assume they have the last schema
+    # For all those documents which lack schema information we assume they have the last schema.
     @Meta.collection.update
       _schema:
         $exists: false

    counts

class globals.Document.RenameFieldsMigration extends globals.Document.MajorMigration
  # Fields is object
  constructor: (fields) ->
    super()


    counts

class globals.Document.AddOptionalFieldsMigration extends globals.Document.MinorMigration
  # Fields is an array.
  constructor: (fields) ->
    super()

