fix(mysql): unreference all connections so that the process can exit cleanly

In a NodeJS environment it will just work as before, but in a Bun environment it will make the "forced exit" error message disappear and remove the 10 s waiting period when migrations are done.
This commit is contained in:
Joakim Carlstein 2024-02-09 13:10:02 +01:00 committed by Joakim Carlstein
parent e7ec75d9e1
commit 198aa545eb
2 changed files with 15 additions and 0 deletions

View file

@ -0,0 +1,5 @@
---
'@emigrate/mysql': patch
---
Unreference all connections automatically so that they don't hinder the process from exiting. This is especially needed in Bun environments as it seems to handle sockets differently regarding this matter than NodeJS.