migrate-mongoose
migrate-mongoose copied to clipboard
Is there a way to grab the `connectionUri` or any other useful information in the `up` or `down` functions?
We have a pretty specific requirement for running migrations, which involves a patch to Mongoose. As a result, we can't simply load a model from mongoose within up()
or down()
. We need to either pass a connection to a model around, or mount the model by using the connectionUri itself. I see that I can't just tack on params like this up(connection)
, but I was hoping there is some other way to grab the current connection information so that our migrations can be written so they run correctly.
Any help would be greatly appreciated, thanks.