global: add support for -DSTAGING

This commit is contained in:
Abdullah Atta
2024-11-28 14:38:28 +05:00
parent c6bcd4a84d
commit e5bf3367cc
9 changed files with 137 additions and 148 deletions

View File

@@ -44,13 +44,6 @@ namespace Notesnook.API.Repositories
public SyncItemsRepository(IDbContext dbContext, IMongoCollection<SyncItem> collection) : base(dbContext, collection)
{
this.collectionName = collection.CollectionNamespace.CollectionName;
#if DEBUG
Collection.Indexes.CreateMany([
new CreateIndexModel<SyncItem>(Builders<SyncItem>.IndexKeys.Ascending("UserId").Descending("DateSynced")),
new CreateIndexModel<SyncItem>(Builders<SyncItem>.IndexKeys.Ascending("UserId").Ascending("ItemId")),
new CreateIndexModel<SyncItem>(Builders<SyncItem>.IndexKeys.Ascending("UserId"))
]);
#endif
}
private readonly List<string> ALGORITHMS = [Algorithms.Default];