summaryrefslogtreecommitdiffstats
path: root/models/attachments.js
diff options
context:
space:
mode:
authorJustin Reynolds <justinr1234@gmail.com>2019-02-28 11:44:29 -0600
committerJustin Reynolds <justinr1234@gmail.com>2019-02-28 11:44:29 -0600
commit3c49e2d0edec19eff4f87b0fcc127f924af193fc (patch)
tree99074349d9befecceaa02b4b8776718591712801 /models/attachments.js
parent904b5bf0f5f6e36131bf2d081a5d08fef408ac81 (diff)
downloadwekan-3c49e2d0edec19eff4f87b0fcc127f924af193fc.tar.gz
wekan-3c49e2d0edec19eff4f87b0fcc127f924af193fc.tar.bz2
wekan-3c49e2d0edec19eff4f87b0fcc127f924af193fc.zip
Performance Enhancements
Diffstat (limited to 'models/attachments.js')
-rw-r--r--models/attachments.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/models/attachments.js b/models/attachments.js
index 3da067de..f870861b 100644
--- a/models/attachments.js
+++ b/models/attachments.js
@@ -27,6 +27,10 @@ Attachments = new FS.Collection('attachments', {
if (Meteor.isServer) {
+ Meteor.startup(() => {
+ Attachments.files._ensureIndex({ cardId: 1 });
+ });
+
Attachments.allow({
insert(userId, doc) {
return allowIsBoardMember(userId, Boards.findOne(doc.boardId));