Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print the migration name when errors occur #3

Open
lluchs opened this issue Sep 24, 2014 · 4 comments
Open

Print the migration name when errors occur #3

lluchs opened this issue Sep 24, 2014 · 4 comments

Comments

@lluchs
Copy link
Contributor

lluchs commented Sep 24, 2014

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.

@ShawnMilo
Copy link
Contributor

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.

@chakrit
Copy link

chakrit commented Aug 6, 2015

Also, the command should prints the number of migrations ran so far and those that are yet to run because of the error.

@alecha
Copy link

alecha commented Apr 11, 2016

+1

@opensas
Copy link
Contributor

opensas commented Mar 27, 2019

perhaps adding a "verbose" switch and/or configuration would be helpful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants