0

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 !

Jack.c
  • 1,035
  • 1
  • 11
  • 14

1 Answers1

1

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.

MattM
  • 1,159
  • 1
  • 13
  • 25