Merge pull request #6093 from harryadel/createIndex-migration

Migrate createIndex to createIndexAsync
This commit is contained in:
Lauri Ojansivu 2026-01-24 02:04:35 +02:00 committed by GitHub
commit 25eedd187e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
32 changed files with 112 additions and 110 deletions

View file

@ -212,10 +212,10 @@ function publishChekListUncompleted(userId, doc) {
// Activities
if (Meteor.isServer) {
Meteor.startup(() => {
ChecklistItems._collection.createIndex({ modifiedAt: -1 });
ChecklistItems._collection.createIndex({ checklistId: 1 });
ChecklistItems._collection.createIndex({ cardId: 1 });
Meteor.startup(async () => {
await ChecklistItems._collection.createIndexAsync({ modifiedAt: -1 });
await ChecklistItems._collection.createIndexAsync({ checklistId: 1 });
await ChecklistItems._collection.createIndexAsync({ cardId: 1 });
});
ChecklistItems.after.update((userId, doc, fieldNames) => {