Reputation: 1255
Given I'm trying to keep track of changes made on my Mongo DB. I decided to make use of a little package called migrate-mongo. (https://www.npmjs.com/package/migrate-mongo)
Now my question is the following.
I understand that this will keep track of any changes made to my DB as long as I generate a new migration script and populate the up/down function with the changes and run migrate-mongo up/down
I definitely see the benefit in using this in when modifying collection validation in code for eg.
But what if I'm using an Express App that inserts a collection through an API call, how could I possibly keep track of that change in the changelog? What am I missing here...?
Thanks !
Upvotes: 0
Views: 1312
Reputation: 1289
I don't think you're missing anything. This package, and others like it, are probably only able to track changes to the db at dev time, not programmatically at runtime.
Upvotes: 1