Some of the things listed here have been implemented, some have not. Most will change when I have some more time to come back to this project.
A meteor package that tracks changes to a mongo collection.
** This package is a work in progress and will feature many a breaking change during the near future **
Clone this repo to the packages
directory within your meteor app.
meteor add hockeyj85:collection-history
// Set up a database to store the changes in.
var HistoryDatabase = new Mongo.Collection('historyOfChanges');
// Create a new tracker that will use this database for storing its changes.
var HistoryTracker = new collectionHistory(HistoryDatabase);
// Watch a database and record activity to it.
var importantDatabase = new Mongo.Collection('importantInformation');
HistoryTracker.auditCollection(importantDatabase);
This package is incomplete, you can view the stored information using mongo queries on the collection which the history is stored in.
Expect many breaking changes here.
Track collection
.
Not working.
Not working.
Get the diff immediately before _id. _id is:
{
// other props
doc: {
_id: "a mongo Id"
}
}
Get the diff immediately after _id.