mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Fixed _ensureIndex to createIndex for MongoDB 5. Updated to latest Meteor beta.
This commit is contained in:
parent
4bbe63365c
commit
c926475eb1
29 changed files with 68 additions and 63 deletions
|
|
@ -6,9 +6,9 @@
|
||||||
meteor-base@1.5.1
|
meteor-base@1.5.1
|
||||||
|
|
||||||
# Build system
|
# Build system
|
||||||
ecmascript@0.15.3
|
ecmascript@0.16.0-beta250.3
|
||||||
standard-minifier-css@1.7.4
|
standard-minifier-css@1.7.4
|
||||||
standard-minifier-js@2.7.0
|
standard-minifier-js@2.7.1
|
||||||
mquandalle:jade
|
mquandalle:jade
|
||||||
coffeescript@2.4.1!
|
coffeescript@2.4.1!
|
||||||
|
|
||||||
|
|
@ -122,7 +122,7 @@ pascoual:pdfkit
|
||||||
lmieulet:meteor-coverage
|
lmieulet:meteor-coverage
|
||||||
meteortesting:mocha
|
meteortesting:mocha
|
||||||
aldeed:simple-schema
|
aldeed:simple-schema
|
||||||
accounts-password
|
accounts-password@2.2.0-beta250.3
|
||||||
matb33:collection-hooks
|
matb33:collection-hooks
|
||||||
simple:json-routes
|
simple:json-routes
|
||||||
kadira:flow-router
|
kadira:flow-router
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
METEOR@2.4
|
METEOR@2.5-beta.3
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
accounts-base@2.1.0
|
accounts-base@2.2.0-beta250.3
|
||||||
accounts-password@2.1.0
|
accounts-password@2.2.0-beta250.3
|
||||||
aldeed:collection2@2.10.0
|
aldeed:collection2@2.10.0
|
||||||
aldeed:collection2-core@1.2.0
|
aldeed:collection2-core@1.2.0
|
||||||
aldeed:schema-deny@1.1.0
|
aldeed:schema-deny@1.1.0
|
||||||
|
|
@ -8,7 +8,7 @@ aldeed:simple-schema@1.5.4
|
||||||
allow-deny@1.1.0
|
allow-deny@1.1.0
|
||||||
arillo:flow-router-helpers@0.5.2
|
arillo:flow-router-helpers@0.5.2
|
||||||
audit-argument-checks@1.0.7
|
audit-argument-checks@1.0.7
|
||||||
autoupdate@1.7.0
|
autoupdate@1.8.0-beta250.3
|
||||||
babel-compiler@7.7.0
|
babel-compiler@7.7.0
|
||||||
babel-runtime@1.5.0
|
babel-runtime@1.5.0
|
||||||
base64@1.0.12
|
base64@1.0.12
|
||||||
|
|
@ -38,7 +38,7 @@ deps@1.0.12
|
||||||
diff-sequence@1.1.1
|
diff-sequence@1.1.1
|
||||||
dynamic-import@0.7.1
|
dynamic-import@0.7.1
|
||||||
easylogic:summernote@0.8.8
|
easylogic:summernote@0.8.8
|
||||||
ecmascript@0.15.3
|
ecmascript@0.16.0-beta250.3
|
||||||
ecmascript-runtime@0.8.0
|
ecmascript-runtime@0.8.0
|
||||||
ecmascript-runtime-client@0.12.1
|
ecmascript-runtime-client@0.12.1
|
||||||
ecmascript-runtime-server@0.11.0
|
ecmascript-runtime-server@0.11.0
|
||||||
|
|
@ -171,14 +171,14 @@ rajit:bootstrap3-datepicker-zh-cn@1.7.1
|
||||||
rajit:bootstrap3-datepicker-zh-tw@1.7.1
|
rajit:bootstrap3-datepicker-zh-tw@1.7.1
|
||||||
random@1.2.0
|
random@1.2.0
|
||||||
rate-limit@1.0.9
|
rate-limit@1.0.9
|
||||||
react-fast-refresh@0.1.1
|
react-fast-refresh@0.2.0-beta250.3
|
||||||
reactive-dict@1.3.0
|
reactive-dict@1.3.0
|
||||||
reactive-var@1.0.11
|
reactive-var@1.0.11
|
||||||
reload@1.3.1
|
reload@1.3.1
|
||||||
retry@1.1.0
|
retry@1.1.0
|
||||||
routepolicy@1.1.1
|
routepolicy@1.1.1
|
||||||
rzymek:fullcalendar@3.8.0
|
rzymek:fullcalendar@3.8.0
|
||||||
service-configuration@1.2.0
|
service-configuration@1.3.0-beta250.3
|
||||||
session@1.2.0
|
session@1.2.0
|
||||||
sha@1.0.9
|
sha@1.0.9
|
||||||
shell-server@0.5.0
|
shell-server@0.5.0
|
||||||
|
|
@ -201,7 +201,7 @@ url@1.3.2
|
||||||
useraccounts:core@1.16.2
|
useraccounts:core@1.16.2
|
||||||
useraccounts:flow-routing@1.15.0
|
useraccounts:flow-routing@1.15.0
|
||||||
useraccounts:unstyled@1.14.2
|
useraccounts:unstyled@1.14.2
|
||||||
webapp@1.13.0
|
webapp@1.13.0-beta250.3
|
||||||
webapp-hashing@1.1.0
|
webapp-hashing@1.1.0
|
||||||
wekan-markdown@1.0.9
|
wekan-markdown@1.0.9
|
||||||
zimme:active-route@2.3.2
|
zimme:active-route@2.3.2
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ AccountSettings.allow({
|
||||||
|
|
||||||
if (Meteor.isServer) {
|
if (Meteor.isServer) {
|
||||||
Meteor.startup(() => {
|
Meteor.startup(() => {
|
||||||
AccountSettings._collection._ensureIndex({ modifiedAt: -1 });
|
AccountSettings._collection.createIndex({ modifiedAt: -1 });
|
||||||
AccountSettings.upsert(
|
AccountSettings.upsert(
|
||||||
{ _id: 'accounts-allowEmailChange' },
|
{ _id: 'accounts-allowEmailChange' },
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ Actions.helpers({
|
||||||
|
|
||||||
if (Meteor.isServer) {
|
if (Meteor.isServer) {
|
||||||
Meteor.startup(() => {
|
Meteor.startup(() => {
|
||||||
Actions._collection._ensureIndex({ modifiedAt: -1 });
|
Actions._collection.createIndex({ modifiedAt: -1 });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -82,19 +82,19 @@ if (Meteor.isServer) {
|
||||||
// creation in conjunction with the card or board id, as corresponding views
|
// creation in conjunction with the card or board id, as corresponding views
|
||||||
// are largely used in the App. See #524.
|
// are largely used in the App. See #524.
|
||||||
Meteor.startup(() => {
|
Meteor.startup(() => {
|
||||||
Activities._collection._ensureIndex({ createdAt: -1 });
|
Activities._collection.createIndex({ createdAt: -1 });
|
||||||
Activities._collection._ensureIndex({ modifiedAt: -1 });
|
Activities._collection.createIndex({ modifiedAt: -1 });
|
||||||
Activities._collection._ensureIndex({ cardId: 1, createdAt: -1 });
|
Activities._collection.createIndex({ cardId: 1, createdAt: -1 });
|
||||||
Activities._collection._ensureIndex({ boardId: 1, createdAt: -1 });
|
Activities._collection.createIndex({ boardId: 1, createdAt: -1 });
|
||||||
Activities._collection._ensureIndex(
|
Activities._collection.createIndex(
|
||||||
{ commentId: 1 },
|
{ commentId: 1 },
|
||||||
{ partialFilterExpression: { commentId: { $exists: true } } },
|
{ partialFilterExpression: { commentId: { $exists: true } } },
|
||||||
);
|
);
|
||||||
Activities._collection._ensureIndex(
|
Activities._collection.createIndex(
|
||||||
{ attachmentId: 1 },
|
{ attachmentId: 1 },
|
||||||
{ partialFilterExpression: { attachmentId: { $exists: true } } },
|
{ partialFilterExpression: { attachmentId: { $exists: true } } },
|
||||||
);
|
);
|
||||||
Activities._collection._ensureIndex(
|
Activities._collection.createIndex(
|
||||||
{ customFieldId: 1 },
|
{ customFieldId: 1 },
|
||||||
{ partialFilterExpression: { customFieldId: { $exists: true } } },
|
{ partialFilterExpression: { customFieldId: { $exists: true } } },
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ Announcements.allow({
|
||||||
|
|
||||||
if (Meteor.isServer) {
|
if (Meteor.isServer) {
|
||||||
Meteor.startup(() => {
|
Meteor.startup(() => {
|
||||||
Announcements._collection._ensureIndex({ modifiedAt: -1 });
|
Announcements._collection.createIndex({ modifiedAt: -1 });
|
||||||
const announcements = Announcements.findOne({});
|
const announcements = Announcements.findOne({});
|
||||||
if (!announcements) {
|
if (!announcements) {
|
||||||
Announcements.insert({ enabled: false, sort: 0 });
|
Announcements.insert({ enabled: false, sort: 0 });
|
||||||
|
|
|
||||||
|
|
@ -186,7 +186,7 @@ Attachments = new FS.Collection('attachments', {
|
||||||
|
|
||||||
if (Meteor.isServer) {
|
if (Meteor.isServer) {
|
||||||
Meteor.startup(() => {
|
Meteor.startup(() => {
|
||||||
Attachments.files._ensureIndex({ cardId: 1 });
|
Attachments.files.createIndex({ cardId: 1 });
|
||||||
});
|
});
|
||||||
|
|
||||||
Attachments.allow({
|
Attachments.allow({
|
||||||
|
|
|
||||||
|
|
@ -1696,15 +1696,15 @@ Boards.before.insert((userId, doc) => {
|
||||||
if (Meteor.isServer) {
|
if (Meteor.isServer) {
|
||||||
// Let MongoDB ensure that a member is not included twice in the same board
|
// Let MongoDB ensure that a member is not included twice in the same board
|
||||||
Meteor.startup(() => {
|
Meteor.startup(() => {
|
||||||
Boards._collection._ensureIndex({ modifiedAt: -1 });
|
Boards._collection.createIndex({ modifiedAt: -1 });
|
||||||
Boards._collection._ensureIndex(
|
Boards._collection.createIndex(
|
||||||
{
|
{
|
||||||
_id: 1,
|
_id: 1,
|
||||||
'members.userId': 1,
|
'members.userId': 1,
|
||||||
},
|
},
|
||||||
{ unique: true },
|
{ unique: true },
|
||||||
);
|
);
|
||||||
Boards._collection._ensureIndex({ 'members.userId': 1 });
|
Boards._collection.createIndex({ 'members.userId': 1 });
|
||||||
});
|
});
|
||||||
|
|
||||||
// Genesis: the first activity of the newly created board
|
// Genesis: the first activity of the newly created board
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,6 @@ CardCommentReactions.allow({
|
||||||
|
|
||||||
if (Meteor.isServer) {
|
if (Meteor.isServer) {
|
||||||
Meteor.startup(() => {
|
Meteor.startup(() => {
|
||||||
CardCommentReactions._collection._ensureIndex({ cardCommentId: 1 }, { unique: true });
|
CardCommentReactions._collection.createIndex({ cardCommentId: 1 }, { unique: true });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -178,8 +178,8 @@ if (Meteor.isServer) {
|
||||||
// Comments are often fetched within a card, so we create an index to make these
|
// Comments are often fetched within a card, so we create an index to make these
|
||||||
// queries more efficient.
|
// queries more efficient.
|
||||||
Meteor.startup(() => {
|
Meteor.startup(() => {
|
||||||
CardComments._collection._ensureIndex({ modifiedAt: -1 });
|
CardComments._collection.createIndex({ modifiedAt: -1 });
|
||||||
CardComments._collection._ensureIndex({ cardId: 1, createdAt: -1 });
|
CardComments._collection.createIndex({ cardId: 1, createdAt: -1 });
|
||||||
});
|
});
|
||||||
|
|
||||||
CardComments.after.insert((userId, doc) => {
|
CardComments.after.insert((userId, doc) => {
|
||||||
|
|
|
||||||
|
|
@ -2991,14 +2991,14 @@ if (Meteor.isServer) {
|
||||||
// Cards are often fetched within a board, so we create an index to make these
|
// Cards are often fetched within a board, so we create an index to make these
|
||||||
// queries more efficient.
|
// queries more efficient.
|
||||||
Meteor.startup(() => {
|
Meteor.startup(() => {
|
||||||
Cards._collection._ensureIndex({ modifiedAt: -1 });
|
Cards._collection.createIndex({ modifiedAt: -1 });
|
||||||
Cards._collection._ensureIndex({ boardId: 1, createdAt: -1 });
|
Cards._collection.createIndex({ boardId: 1, createdAt: -1 });
|
||||||
// https://github.com/wekan/wekan/issues/1863
|
// https://github.com/wekan/wekan/issues/1863
|
||||||
// Swimlane added a new field in the cards collection of mongodb named parentId.
|
// Swimlane added a new field in the cards collection of mongodb named parentId.
|
||||||
// When loading a board, mongodb is searching for every cards, the id of the parent (in the swinglanes collection).
|
// When loading a board, mongodb is searching for every cards, the id of the parent (in the swinglanes collection).
|
||||||
// With a huge database, this result in a very slow app and high CPU on the mongodb side.
|
// With a huge database, this result in a very slow app and high CPU on the mongodb side.
|
||||||
// To correct it, add Index to parentId:
|
// To correct it, add Index to parentId:
|
||||||
Cards._collection._ensureIndex({ parentId: 1 });
|
Cards._collection.createIndex({ parentId: 1 });
|
||||||
// let notifydays = parseInt(process.env.NOTIFY_DUE_DAYS_BEFORE_AND_AFTER) || 2; // default as 2 days b4 and after
|
// let notifydays = parseInt(process.env.NOTIFY_DUE_DAYS_BEFORE_AND_AFTER) || 2; // default as 2 days b4 and after
|
||||||
// let notifyitvl = parseInt(process.env.NOTIFY_DUE_AT_HOUR_OF_DAY) || 3600 * 24 * 1e3; // default interval as one day
|
// let notifyitvl = parseInt(process.env.NOTIFY_DUE_AT_HOUR_OF_DAY) || 3600 * 24 * 1e3; // default interval as one day
|
||||||
// Meteor.call("findDueCards",notifydays,notifyitvl);
|
// Meteor.call("findDueCards",notifydays,notifyitvl);
|
||||||
|
|
|
||||||
|
|
@ -213,9 +213,9 @@ function publishChekListUncompleted(userId, doc) {
|
||||||
// Activities
|
// Activities
|
||||||
if (Meteor.isServer) {
|
if (Meteor.isServer) {
|
||||||
Meteor.startup(() => {
|
Meteor.startup(() => {
|
||||||
ChecklistItems._collection._ensureIndex({ modifiedAt: -1 });
|
ChecklistItems._collection.createIndex({ modifiedAt: -1 });
|
||||||
ChecklistItems._collection._ensureIndex({ checklistId: 1 });
|
ChecklistItems._collection.createIndex({ checklistId: 1 });
|
||||||
ChecklistItems._collection._ensureIndex({ cardId: 1 });
|
ChecklistItems._collection.createIndex({ cardId: 1 });
|
||||||
});
|
});
|
||||||
|
|
||||||
ChecklistItems.after.update((userId, doc, fieldNames) => {
|
ChecklistItems.after.update((userId, doc, fieldNames) => {
|
||||||
|
|
|
||||||
|
|
@ -195,8 +195,8 @@ Checklists.mutations({
|
||||||
|
|
||||||
if (Meteor.isServer) {
|
if (Meteor.isServer) {
|
||||||
Meteor.startup(() => {
|
Meteor.startup(() => {
|
||||||
Checklists._collection._ensureIndex({ modifiedAt: -1 });
|
Checklists._collection.createIndex({ modifiedAt: -1 });
|
||||||
Checklists._collection._ensureIndex({ cardId: 1, createdAt: 1 });
|
Checklists._collection.createIndex({ cardId: 1, createdAt: 1 });
|
||||||
});
|
});
|
||||||
|
|
||||||
Checklists.after.insert((userId, doc) => {
|
Checklists.after.insert((userId, doc) => {
|
||||||
|
|
|
||||||
|
|
@ -231,8 +231,8 @@ function customFieldEdit(userId, doc) {
|
||||||
|
|
||||||
if (Meteor.isServer) {
|
if (Meteor.isServer) {
|
||||||
Meteor.startup(() => {
|
Meteor.startup(() => {
|
||||||
CustomFields._collection._ensureIndex({ modifiedAt: -1 });
|
CustomFields._collection.createIndex({ modifiedAt: -1 });
|
||||||
CustomFields._collection._ensureIndex({ boardIds: 1 });
|
CustomFields._collection.createIndex({ boardIds: 1 });
|
||||||
});
|
});
|
||||||
|
|
||||||
CustomFields.after.insert((userId, doc) => {
|
CustomFields.after.insert((userId, doc) => {
|
||||||
|
|
|
||||||
|
|
@ -121,8 +121,8 @@ Integrations.allow({
|
||||||
//INTEGRATIONS REST API
|
//INTEGRATIONS REST API
|
||||||
if (Meteor.isServer) {
|
if (Meteor.isServer) {
|
||||||
Meteor.startup(() => {
|
Meteor.startup(() => {
|
||||||
Integrations._collection._ensureIndex({ modifiedAt: -1 });
|
Integrations._collection.createIndex({ modifiedAt: -1 });
|
||||||
Integrations._collection._ensureIndex({ boardId: 1 });
|
Integrations._collection.createIndex({ boardId: 1 });
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ InvitationCodes.helpers({
|
||||||
|
|
||||||
if (Meteor.isServer) {
|
if (Meteor.isServer) {
|
||||||
Meteor.startup(() => {
|
Meteor.startup(() => {
|
||||||
InvitationCodes._collection._ensureIndex({ modifiedAt: -1 });
|
InvitationCodes._collection.createIndex({ modifiedAt: -1 });
|
||||||
});
|
});
|
||||||
Boards.deny({
|
Boards.deny({
|
||||||
fetch: ['members'],
|
fetch: ['members'],
|
||||||
|
|
|
||||||
|
|
@ -415,9 +415,9 @@ Lists.hookOptions.after.update = { fetchPrevious: false };
|
||||||
|
|
||||||
if (Meteor.isServer) {
|
if (Meteor.isServer) {
|
||||||
Meteor.startup(() => {
|
Meteor.startup(() => {
|
||||||
Lists._collection._ensureIndex({ modifiedAt: -1 });
|
Lists._collection.createIndex({ modifiedAt: -1 });
|
||||||
Lists._collection._ensureIndex({ boardId: 1 });
|
Lists._collection.createIndex({ boardId: 1 });
|
||||||
Lists._collection._ensureIndex({ archivedAt: -1 });
|
Lists._collection.createIndex({ archivedAt: -1 });
|
||||||
});
|
});
|
||||||
|
|
||||||
Lists.after.insert((userId, doc) => {
|
Lists.after.insert((userId, doc) => {
|
||||||
|
|
|
||||||
|
|
@ -218,8 +218,8 @@ if (Meteor.isServer) {
|
||||||
if (Meteor.isServer) {
|
if (Meteor.isServer) {
|
||||||
// Index for Organization name.
|
// Index for Organization name.
|
||||||
Meteor.startup(() => {
|
Meteor.startup(() => {
|
||||||
// Org._collection._ensureIndex({ name: -1 });
|
// Org._collection.createIndex({ name: -1 });
|
||||||
Org._collection._ensureIndex({ orgDisplayName: 1 });
|
Org._collection.createIndex({ orgDisplayName: 1 });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -74,8 +74,8 @@ OrgUser.attachSchema(
|
||||||
if (Meteor.isServer) {
|
if (Meteor.isServer) {
|
||||||
// Index for Organization User.
|
// Index for Organization User.
|
||||||
Meteor.startup(() => {
|
Meteor.startup(() => {
|
||||||
OrgUser._collection._ensureIndex({ orgId: -1 });
|
OrgUser._collection.createIndex({ orgId: -1 });
|
||||||
OrgUser._collection._ensureIndex({ orgId: -1, userId: -1 });
|
OrgUser._collection.createIndex({ orgId: -1, userId: -1 });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ Rules.allow({
|
||||||
|
|
||||||
if (Meteor.isServer) {
|
if (Meteor.isServer) {
|
||||||
Meteor.startup(() => {
|
Meteor.startup(() => {
|
||||||
Rules._collection._ensureIndex({ modifiedAt: -1 });
|
Rules._collection.createIndex({ modifiedAt: -1 });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -147,7 +147,7 @@ Settings.allow({
|
||||||
|
|
||||||
if (Meteor.isServer) {
|
if (Meteor.isServer) {
|
||||||
Meteor.startup(() => {
|
Meteor.startup(() => {
|
||||||
Settings._collection._ensureIndex({ modifiedAt: -1 });
|
Settings._collection.createIndex({ modifiedAt: -1 });
|
||||||
const setting = Settings.findOne({});
|
const setting = Settings.findOne({});
|
||||||
if (!setting) {
|
if (!setting) {
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
|
|
|
||||||
|
|
@ -331,8 +331,8 @@ Swimlanes.hookOptions.after.update = { fetchPrevious: false };
|
||||||
|
|
||||||
if (Meteor.isServer) {
|
if (Meteor.isServer) {
|
||||||
Meteor.startup(() => {
|
Meteor.startup(() => {
|
||||||
Swimlanes._collection._ensureIndex({ modifiedAt: -1 });
|
Swimlanes._collection.createIndex({ modifiedAt: -1 });
|
||||||
Swimlanes._collection._ensureIndex({ boardId: 1 });
|
Swimlanes._collection.createIndex({ boardId: 1 });
|
||||||
});
|
});
|
||||||
|
|
||||||
Swimlanes.after.insert((userId, doc) => {
|
Swimlanes.after.insert((userId, doc) => {
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ TableVisibilityModeSettings.allow({
|
||||||
|
|
||||||
if (Meteor.isServer) {
|
if (Meteor.isServer) {
|
||||||
Meteor.startup(() => {
|
Meteor.startup(() => {
|
||||||
TableVisibilityModeSettings._collection._ensureIndex({ modifiedAt: -1 });
|
TableVisibilityModeSettings._collection.createIndex({ modifiedAt: -1 });
|
||||||
TableVisibilityModeSettings.upsert(
|
TableVisibilityModeSettings.upsert(
|
||||||
{ _id: 'tableVisibilityMode-allowPrivateOnly' },
|
{ _id: 'tableVisibilityMode-allowPrivateOnly' },
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -216,7 +216,7 @@ if (Meteor.isServer) {
|
||||||
if (Meteor.isServer) {
|
if (Meteor.isServer) {
|
||||||
// Index for Team name.
|
// Index for Team name.
|
||||||
Meteor.startup(() => {
|
Meteor.startup(() => {
|
||||||
Team._collection._ensureIndex({ teamDisplayName: 1 });
|
Team._collection.createIndex({ teamDisplayName: 1 });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ Triggers.helpers({
|
||||||
|
|
||||||
if (Meteor.isServer) {
|
if (Meteor.isServer) {
|
||||||
Meteor.startup(() => {
|
Meteor.startup(() => {
|
||||||
Triggers._collection._ensureIndex({ modifiedAt: -1 });
|
Triggers._collection.createIndex({ modifiedAt: -1 });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -56,8 +56,8 @@ if (Meteor.isServer) {
|
||||||
return userId === doc.userId && fieldNames.indexOf('userId') === -1;
|
return userId === doc.userId && fieldNames.indexOf('userId') === -1;
|
||||||
}
|
}
|
||||||
Meteor.startup(() => {
|
Meteor.startup(() => {
|
||||||
UnsavedEditCollection._collection._ensureIndex({ modifiedAt: -1 });
|
UnsavedEditCollection._collection.createIndex({ modifiedAt: -1 });
|
||||||
UnsavedEditCollection._collection._ensureIndex({ userId: 1 });
|
UnsavedEditCollection._collection.createIndex({ userId: 1 });
|
||||||
});
|
});
|
||||||
UnsavedEditCollection.allow({
|
UnsavedEditCollection.allow({
|
||||||
insert: isAuthor,
|
insert: isAuthor,
|
||||||
|
|
|
||||||
|
|
@ -1661,12 +1661,12 @@ if (Meteor.isServer) {
|
||||||
// Let mongoDB ensure username unicity
|
// Let mongoDB ensure username unicity
|
||||||
Meteor.startup(() => {
|
Meteor.startup(() => {
|
||||||
allowedSortValues.forEach((value) => {
|
allowedSortValues.forEach((value) => {
|
||||||
Lists._collection._ensureIndex(value);
|
Lists._collection.createIndex(value);
|
||||||
});
|
});
|
||||||
Users._collection._ensureIndex({
|
Users._collection.createIndex({
|
||||||
modifiedAt: -1,
|
modifiedAt: -1,
|
||||||
});
|
});
|
||||||
Users._collection._ensureIndex(
|
Users._collection.createIndex(
|
||||||
{
|
{
|
||||||
username: 1,
|
username: 1,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
11
package-lock.json
generated
11
package-lock.json
generated
|
|
@ -535,6 +535,11 @@
|
||||||
"regenerator-runtime": "^0.11.0"
|
"regenerator-runtime": "^0.11.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"core-js": {
|
||||||
|
"version": "2.6.12",
|
||||||
|
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz",
|
||||||
|
"integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ=="
|
||||||
|
},
|
||||||
"regenerator-runtime": {
|
"regenerator-runtime": {
|
||||||
"version": "0.11.1",
|
"version": "0.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
|
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
|
||||||
|
|
@ -838,9 +843,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"core-js": {
|
"core-js": {
|
||||||
"version": "2.6.12",
|
"version": "3.21.0",
|
||||||
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz",
|
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.21.0.tgz",
|
||||||
"integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ=="
|
"integrity": "sha512-YUdI3fFu4TF/2WykQ2xzSiTQdldLB4KVuL9WeAy5XONZYt5Cun/fpQvctoKbCgvPhmzADeesTk/j2Rdx77AcKQ=="
|
||||||
},
|
},
|
||||||
"core-util-is": {
|
"core-util-is": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue