I use a Hikari connection pool in a project and have logic to configure and create db connections already. It would be nice if that logic could be reused when dealing with migrations. As far as I can tell this feature would only require small modifications of the connect* function. The function could check if db is an instance of a connection, or contains a :connection key and if so forgo creating the connection.
Would it make sense to pass in an existing connection instance to migratus instead of specifying a db connection map?
Ref: https://github.com/yogthos/migratus/issues/90#issuecomment-250065862
I use a Hikari connection pool in a project and have logic to configure and create db connections already. It would be nice if that logic could be reused when dealing with migrations. As far as I can tell this feature would only require small modifications of the
connect*
function. The function could check ifdb
is an instance of a connection, or contains a:connection
key and if so forgo creating the connection.