Fixes #575, #587, #647
Improved test case for #587
Merge pull request #649 from bpg/master

Failed SQL migration error reporting improvement