Releases: MumblesNZ/mongoose-archiver
Releases · MumblesNZ/mongoose-archiver
Enforce unique _id
Original document _id no longer set to archived document _id.
Schema has archived_id param set to original document _id, and new _id is set.
Also removed_at now set properly.
This fixes a bug where if the original document happens to have an _id which is identical to one which is already archived, or if through another bug your original document is never deleted, then multiple archived copies are created. Decouples the requirement that the original document needs to be archived only once.