Skip to content

Commit

Permalink
Fix for #564
Browse files Browse the repository at this point in the history
* Migrate by adding ParallelCorpora field to all projects
  • Loading branch information
johnml1135 committed Dec 11, 2024
1 parent 779cb72 commit 8745642
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ await c.Indexes.CreateOrUpdateAsync(
await c.Indexes.CreateOrUpdateAsync(
new CreateIndexModel<Engine>(Builders<Engine>.IndexKeys.Ascending(e => e.DateCreated))
);
// migrate to new ParallelCorpora scheme by adding ParallelCorpora to existing engines
await c.UpdateManyAsync(
Builders<Engine>.Filter.Exists(e => e.ParallelCorpora, false),
Builders<Engine>.Update.Set(e => e.ParallelCorpora, new List<ParallelCorpus>())
);
}
);
configurator.AddRepository<Build>(
Expand Down

0 comments on commit 8745642

Please sign in to comment.