rubenv / sql-migrate

SQL schema migration tool for Go.
MIT License
3.23k stars 280 forks source link

Fix panic when migration file removed #93

Closed bongnv closed 7 years ago

bongnv commented 7 years ago

When a migration file is removed, command sql-migrate status will panic as it couldn't find the relevant file on migration folder. This PR attempts to fix that panic.

rubenv commented 7 years ago

I'm guessing it's pretty hard to add a unit test for this?

Doesn't break anything, so good to merge for me.

bongnv commented 7 years ago

:) I was thinking about it but didn't see any unit test written. Just double-checked and found out it's placed in root folder. Will add next time