diff options
Diffstat (limited to 'models/cards.js')
-rw-r--r-- | models/cards.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/models/cards.js b/models/cards.js index aa19a64a..84fbb6c2 100644 --- a/models/cards.js +++ b/models/cards.js @@ -210,6 +210,12 @@ Cards.mutations({ }); if (Meteor.isServer) { + // Cards are often fetched within a board, so we create an index to make these + // queries more efficient. + Meteor.startup(() => { + Cards._collection._ensureIndex({ boardId: 1 }); + }); + Cards.after.insert((userId, doc) => { Activities.insert({ userId, |