yogthos / migratus

MIGRATE ALL THE THINGS!
642 stars 93 forks source link

migratus.core/select-migrations leaks DB connections #185

Closed griff closed 4 years ago

griff commented 4 years ago

The function migratus.core/select-migrations never calls disconnect and so if called repeatedly leaks a DB connection on each call.

I use a DB pool and was testing my migrations and migratus and so was calling migratus.core/completed-list and migratus.core/pending-list a lot and that is when I discovered this issue since my pool would run out of connections pretty quickly.

yogthos commented 4 years ago

Oh that's a good catch, would you be ok to do PR for the fix?