rubenv / sql-migrate

SQL schema migration tool for Go.
MIT License
3.18k stars 270 forks source link

Close the database before exiting #207

Closed blyoa closed 2 years ago

blyoa commented 2 years ago

The database are currently not closed, which may be logged as a failed connection. For example, MySQL logs as follows if db.Close was not called:

[Note] Aborted connection N to db: 'xxx' user: 'yyy' host: 'zzz' (Got an error reading communication packets)
rubenv commented 2 years ago

Thanks!