mongoose-history
mongoose-history copied to clipboard
Keeps a history of all changes of a document.
How do I save only changes in the database? I don't want to save the whole document. I want to save only changes is there a way to do that?...
I'm using `"mongoose-history": "^0.8.0"`. If I do something like: ... // plugins schemaPeople.plugin(mongooseHistory, { customCollectionName: name + "History", indexes: [{ 't': -1, 'd._id': 1 }], }); // add support for...
Can I save in history table both original and updated data?
I haven't had time to maintain this project for too long, so it would be wiser to find a new maintainer to support it. Anyone would like to do it?
Today we encountered a bug which was already fixed in November 2020. "Remove deletion of __v when creating history doc" (from 2018) It would be great to get an updated...
I found a bug, when Shema's timestamps option is provided, mongoose-history not work as expected. It save ```js { "_id" : ObjectId("5bff173396b3a40f7f560031"), "t" : ISODate("2018-11-28T22:31:15.528Z"), "o" : "u", "d" :...
When i try to update a document (Schema with plugin), throws this error: ``` message: 'Cast to number failed for value "undefined" at path "__v"', name: 'CastError', stringValue: '"undefined"', kind:...
Same issue here! This issue doesn't happen when I create a document. When I update a document, it does not add the ID of the document under "d" example: ```{...
I have the following query `myModel.findOneAndUpdate({_id: ID},{$push: {myField: myData}},{$new: true})` But `pre findOneAndUpdate` not work and error occur in its integration with schema: ```` let options = { diffOnly: true,...
It seems that even when doing a "same" save, so the same data reentered for save, and even when the mongoose validation fails, a new entry is created about the...