summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2019-02-28 22:39:02 +0200
committerLauri Ojansivu <x@xet7.org>2019-02-28 22:39:02 +0200
commit4b3795814018ceb16f6df4c5e6df146c89e2111a (patch)
treed197f95cfa14decaf1833fa76000de69d593f319 /models
parent49229e1723de14cdc66dc6480624bba426d35e36 (diff)
parent3edff32bde9eda3c0ea8bf3960aa8eef1a3c5524 (diff)
downloadwekan-4b3795814018ceb16f6df4c5e6df146c89e2111a.tar.gz
wekan-4b3795814018ceb16f6df4c5e6df146c89e2111a.tar.bz2
wekan-4b3795814018ceb16f6df4c5e6df146c89e2111a.zip
Merge branch 'devel' into edge
Diffstat (limited to 'models')
-rw-r--r--models/attachments.js4
-rw-r--r--models/checklistItems.js1
-rw-r--r--models/customFields.js6
-rw-r--r--models/integrations.js4
4 files changed, 12 insertions, 3 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));
diff --git a/models/checklistItems.js b/models/checklistItems.js
index 35b18ed7..30e57aec 100644
--- a/models/checklistItems.js
+++ b/models/checklistItems.js
@@ -189,6 +189,7 @@ function publishChekListUncompleted(userId, doc){
if (Meteor.isServer) {
Meteor.startup(() => {
ChecklistItems._collection._ensureIndex({ checklistId: 1 });
+ ChecklistItems._collection._ensureIndex({ cardId: 1 });
});
ChecklistItems.after.update((userId, doc, fieldNames) => {
diff --git a/models/customFields.js b/models/customFields.js
index 3e8aa250..b7ad5467 100644
--- a/models/customFields.js
+++ b/models/customFields.js
@@ -98,9 +98,9 @@ function customFieldCreation(userId, doc){
}
if (Meteor.isServer) {
- /*Meteor.startup(() => {
- CustomFields._collection._ensureIndex({ boardId: 1});
- });*/
+ Meteor.startup(() => {
+ CustomFields._collection._ensureIndex({ boardId: 1 });
+ });
CustomFields.after.insert((userId, doc) => {
customFieldCreation(userId, doc);
diff --git a/models/integrations.js b/models/integrations.js
index 1c473b57..65a7af63 100644
--- a/models/integrations.js
+++ b/models/integrations.js
@@ -88,6 +88,10 @@ Integrations.allow({
//INTEGRATIONS REST API
if (Meteor.isServer) {
+ Meteor.startup(() => {
+ Integrations._collection._ensureIndex({ boardId: 1 });
+ });
+
/**
* @operation get_all_integrations
* @summary Get all integrations in board