database-connector 2.4.9 → 2.4.10

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.
@@ -429,6 +429,7 @@ const subscriptionSchema = new mongoose.Schema(
429
429
 
430
430
  // Auto-record history snapshots to embedded subscriptionsHistory array
431
431
  subscriptionSchema.post('save', async function (doc) {
432
+ if (this.getOptions && this.getOptions().skipHistory) return;
432
433
  await recordSubscriptionHistory(doc);
433
434
  });
434
435
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "database-connector",
3
- "version": "2.4.9",
3
+ "version": "2.4.10",
4
4
  "description": "MongoDB models package with Mongoose schemas for e-commerce applications. Includes User, Product, Store, Order and more with built-in validation and virtual properties.",
5
5
  "main": "models/index.js",
6
6
  "scripts": {