public void AddMigrationError(MigrationVersion version, DocumentMigrationError documentMigrationError) { var d = new Dictionary <string, object> { { "DocumentId", new BsonString(documentMigrationError.DocumentId) }, { "Error", new BsonString(documentMigrationError.Error) } }; GetMigrationsCollection().Update(Query.EQ("_id", new BsonString(version.ToString())), Update.Push("FailedMigrations", new BsonDocument(d))); }
public virtual void SetMigrationLastId(MigrationVersion version, string id) { GetMigrationsCollection().Update(Query.EQ("_id", new BsonString(version.ToString())), Update.Set("LastCompletedId", id).Inc("CompletedCount", 1)); }