Migrate createIndex to createIndexAsync

This commit is contained in:
Harry Adel 2026-01-24 01:55:29 +02:00
parent 60ecddfce4
commit ca2083c858
32 changed files with 112 additions and 110 deletions

View file

@ -160,10 +160,10 @@ PositionHistory.helpers({
});
if (Meteor.isServer) {
Meteor.startup(() => {
PositionHistory._collection.createIndex({ boardId: 1, entityType: 1, entityId: 1 });
PositionHistory._collection.createIndex({ boardId: 1, entityType: 1 });
PositionHistory._collection.createIndex({ createdAt: -1 });
Meteor.startup(async () => {
await PositionHistory._collection.createIndexAsync({ boardId: 1, entityType: 1, entityId: 1 });
await PositionHistory._collection.createIndexAsync({ boardId: 1, entityType: 1 });
await PositionHistory._collection.createIndexAsync({ createdAt: -1 });
});
}