sql-migrate
sql-migrate copied to clipboard
Print the migration name when errors occur
It currently looks something like this when errors occur while running migrations (using mysql):
Migration failed: Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[...]'
It would be helpful if the migration name would be printed as well.
I just pushed a change to my master branch that provides this: https://github.com/ShawnMilo/sql-migrate/commit/c58ca3b957d799a6d402640a65963f3b1299f69c
However, maybe it would be even better to print each migration as it's about to be run. That way there's more info, and also if it blows up the name of the last migration is clearly the one that broke.
Also, the command should prints the number of migrations ran so far and those that are yet to run because of the error.
+1
perhaps adding a "verbose" switch and/or configuration would be helpful