@cool-digital-solutions/interferir-models 1.4.72 → 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,10 +266,8 @@ companySchema.pre('findOneAndUpdate', function (next) {
266
266
  this._update.updatedBy = user._id;
267
267
  next();
268
268
  });
269
- const customCollation = {
270
- locale: 'en',
271
- };
272
269
  companySchema.index({ baseDomains: 1 }, {
270
+ name: 'baseDomains_domainBased_idx',
273
271
  partialFilterExpression: {
274
272
  isDomainBasedAccess: true,
275
273
  deleteDate: null,
@@ -277,14 +275,13 @@ companySchema.index({ baseDomains: 1 }, {
277
275
  background: true,
278
276
  });
279
277
  companySchema.index({ baseDomains: 1 }, {
278
+ name: 'baseDomains_notDeleted_idx',
280
279
  partialFilterExpression: {
281
280
  deleteDate: null,
282
281
  },
283
282
  background: true,
284
283
  });
285
284
  model_indexes_1.INDEX.forEach((indexField) => {
286
- const isTextIndex = Object.values(indexField).some((val) => val === 'text');
287
- const options = isTextIndex ? {} : { collation: customCollation };
288
- companySchema.index(indexField, options);
285
+ companySchema.index(indexField, { background: true });
289
286
  });
290
287
  exports.default = companySchema;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cool-digital-solutions/interferir-models",
3
- "version": "1.4.72",
3
+ "version": "1.4.73",
4
4
  "main": "./dist/index.js",
5
5
  "files": [
6
6
  "dist/**/*"