diff --git a/src/Serval/src/Serval.Translation/Configuration/IMongoDataAccessConfiguratorExtensions.cs b/src/Serval/src/Serval.Translation/Configuration/IMongoDataAccessConfiguratorExtensions.cs index d0092c0b..158ce601 100644 --- a/src/Serval/src/Serval.Translation/Configuration/IMongoDataAccessConfiguratorExtensions.cs +++ b/src/Serval/src/Serval.Translation/Configuration/IMongoDataAccessConfiguratorExtensions.cs @@ -18,6 +18,11 @@ await c.Indexes.CreateOrUpdateAsync( await c.Indexes.CreateOrUpdateAsync( new CreateIndexModel(Builders.IndexKeys.Ascending(e => e.DateCreated)) ); + // migrate to new ParallelCorpora scheme by adding ParallelCorpora to existing engines + await c.UpdateManyAsync( + Builders.Filter.Exists(e => e.ParallelCorpora, false), + Builders.Update.Set(e => e.ParallelCorpora, new List()) + ); } ); configurator.AddRepository(