Masquerade-Circus / mongoose-history-plugin

Mongoose plugin that saves history in JsonPatch format and SemVer format.
Apache License 2.0
48 stars 25 forks source link

Support for multiple DB connections #45

Closed martinvysnovsky closed 1 year ago

martinvysnovsky commented 2 years ago

When you are using multiple DB connections in Mongoose then you need to tell mongoose-history-plugin for which connection you want to create a new table for history. Otherwise, it will not work. Currently, I am using Nest.js which automatically creates a second connection in mongoose. So this fix was the only way to use mongoose-history-plugin in Nest.js.