codebase-models 2.0.8 → 2.0.9
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.
- package/dist/src/models/Page.js +1 -1
- package/dist/src/models/StageInCustomerJourney.js +1 -1
- package/dist/src/models/Test.js +1 -3
- package/dist/src/models/User.js +0 -1
- package/package.json +1 -1
- package/src/models/Page.ts +1 -1
- package/src/models/StageInCustomerJourney.ts +1 -1
- package/src/models/Test.ts +1 -5
- package/src/models/User.ts +0 -1
package/dist/src/models/Page.js
CHANGED
package/dist/src/models/Test.js
CHANGED
|
@@ -187,7 +187,7 @@ TestSchema.pre('save', function (next) {
|
|
|
187
187
|
next();
|
|
188
188
|
});
|
|
189
189
|
});
|
|
190
|
-
TestSchema.index({ iid: 1 }
|
|
190
|
+
TestSchema.index({ iid: 1 });
|
|
191
191
|
// Add compound indexes for better query performance
|
|
192
192
|
TestSchema.index({ client: 1, status: 1 });
|
|
193
193
|
TestSchema.index({ client: 1, status: 1, livedate: 1 });
|
|
@@ -198,8 +198,6 @@ TestSchema.index({ "variations._id": 1 });
|
|
|
198
198
|
TestSchema.index({ status: 1, livedate: 1 });
|
|
199
199
|
TestSchema.index({ status: 1, enddate: 1 });
|
|
200
200
|
// Add partial indexes for better performance
|
|
201
|
-
TestSchema.index({ status: 1 }, { partialFilterExpression: { status: { $in: ['live', 'running', 'draft', 'paused', 'preview', 'ended'] } } });
|
|
202
|
-
TestSchema.index({ client: 1, status: 1 }, { partialFilterExpression: { status: { $in: ['live', 'running', 'draft', 'paused', 'preview', 'ended'] } } });
|
|
203
201
|
// Add TTL index for automatic cleanup of ended tests after 1 year
|
|
204
202
|
TestSchema.index({ enddate: 1 });
|
|
205
203
|
const Test = mongoose_1.default.models.test || (0, mongoose_1.model)("test", TestSchema);
|
package/dist/src/models/User.js
CHANGED
package/package.json
CHANGED
package/src/models/Page.ts
CHANGED
package/src/models/Test.ts
CHANGED
|
@@ -238,8 +238,7 @@ TestSchema.pre('save', async function(next) {
|
|
|
238
238
|
next();
|
|
239
239
|
});
|
|
240
240
|
|
|
241
|
-
|
|
242
|
-
TestSchema.index({ iid: 1 }, { unique: true });
|
|
241
|
+
TestSchema.index({ iid: 1 });
|
|
243
242
|
// Add compound indexes for better query performance
|
|
244
243
|
TestSchema.index({ client: 1, status: 1 });
|
|
245
244
|
TestSchema.index({ client: 1, status: 1, livedate: 1 });
|
|
@@ -251,9 +250,6 @@ TestSchema.index({ status: 1, livedate: 1 });
|
|
|
251
250
|
TestSchema.index({ status: 1, enddate: 1 });
|
|
252
251
|
|
|
253
252
|
// Add partial indexes for better performance
|
|
254
|
-
TestSchema.index({ status: 1 }, { partialFilterExpression: { status: { $in: ['live', 'running', 'draft', 'paused', 'preview', 'ended'] } } });
|
|
255
|
-
TestSchema.index({ client: 1, status: 1 }, { partialFilterExpression: { status: { $in: ['live', 'running', 'draft', 'paused', 'preview', 'ended'] } } });
|
|
256
|
-
|
|
257
253
|
// Add TTL index for automatic cleanup of ended tests after 1 year
|
|
258
254
|
TestSchema.index({ enddate: 1 });
|
|
259
255
|
|