yogthos / migratus

MIGRATE ALL THE THINGS!
641 stars 95 forks source link

Fix disconnect behavior inside Database/init #257

Closed b-ryan closed 8 months ago

b-ryan commented 8 months ago

This should fix the issue I introduced in #256 -- the init function was not disconnecting correctly because previously, it passed a different connection than what was in the connection atom.

This PR uses alternative 2 from my description in #256 which I preferred anyway.

The downside to this approach is that disconnect* is a public function, so this would be a breaking change if anyone is using that function. I'm not sure what your policy is on whether this should be treated as breaking or not. If so, I could introduce an in-between function that calls into disconnect*.

yogthos commented 8 months ago

Everything looks good on my end, I can push a release if you don't have any more changes planned. :)

b-ryan commented 8 months ago

I do not

Thanks!

yogthos commented 8 months ago

Great, I just released 1.5.4 with the updates, thanks again for spearheading the changes for this.