mirror of
https://github.com/wekan/wekan.git
synced 2026-02-21 23:44:06 +01:00
Migrate createIndex to createIndexAsync
This commit is contained in:
parent
60ecddfce4
commit
ca2083c858
32 changed files with 112 additions and 110 deletions
|
|
@ -192,9 +192,9 @@ CardComments.textSearch = (userId, textArray) => {
|
|||
if (Meteor.isServer) {
|
||||
// Comments are often fetched within a card, so we create an index to make these
|
||||
// queries more efficient.
|
||||
Meteor.startup(() => {
|
||||
CardComments._collection.createIndex({ modifiedAt: -1 });
|
||||
CardComments._collection.createIndex({ cardId: 1, createdAt: -1 });
|
||||
Meteor.startup(async () => {
|
||||
await CardComments._collection.createIndexAsync({ modifiedAt: -1 });
|
||||
await CardComments._collection.createIndexAsync({ cardId: 1, createdAt: -1 });
|
||||
});
|
||||
|
||||
CardComments.after.insert((userId, doc) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue