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

@ -2725,11 +2725,11 @@ const addCronJob = _.debounce(
if (Meteor.isServer) {
// Let mongoDB ensure username unicity
Meteor.startup(() => {
allowedSortValues.forEach((value) => {
Lists._collection.createIndex(value);
});
Users._collection.createIndex({
Meteor.startup(async () => {
for (const value of allowedSortValues) {
await Lists._collection.createIndexAsync(value);
}
await Users._collection.createIndexAsync({
modifiedAt: -1,
});
// Avatar URLs from CollectionFS to Meteor-Files, at users collection avatarUrl field: