@cool-digital-solutions/interferir-models 1.4.71 → 1.4.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -266,12 +266,22 @@ companySchema.pre('findOneAndUpdate', function (next) {
|
|
|
266
266
|
this._update.updatedBy = user._id;
|
|
267
267
|
next();
|
|
268
268
|
});
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
269
|
+
companySchema.index({ baseDomains: 1 }, {
|
|
270
|
+
name: 'baseDomains_domainBased_idx',
|
|
271
|
+
partialFilterExpression: {
|
|
272
|
+
isDomainBasedAccess: true,
|
|
273
|
+
deleteDate: null,
|
|
274
|
+
},
|
|
275
|
+
background: true,
|
|
276
|
+
});
|
|
277
|
+
companySchema.index({ baseDomains: 1 }, {
|
|
278
|
+
name: 'baseDomains_notDeleted_idx',
|
|
279
|
+
partialFilterExpression: {
|
|
280
|
+
deleteDate: null,
|
|
281
|
+
},
|
|
282
|
+
background: true,
|
|
283
|
+
});
|
|
272
284
|
model_indexes_1.INDEX.forEach((indexField) => {
|
|
273
|
-
|
|
274
|
-
const options = isTextIndex ? {} : { collation: customCollation };
|
|
275
|
-
companySchema.index(indexField, options);
|
|
285
|
+
companySchema.index(indexField, { background: true });
|
|
276
286
|
});
|
|
277
287
|
exports.default = companySchema;
|