mattes / migrate

Database migrations. CLI and Golang library.
Other
2.29k stars 326 forks source link

MySQL driver has wrong quotes and returns a syntax error #245

Open ernestoalejo opened 7 years ago

ernestoalejo commented 7 years ago

There a correct query in one method; but in the next one the same query is using the wrong quotes.

The result is a syntax error:

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 '"schema_migrations"' at line 1 in line 0: SHOW TABLES LIKE "schema_migrations"
mattes commented 7 years ago

can you open a PR for this to fix it?

ernestoalejo commented 7 years ago

I can change the quotes blindly but when I run make test-short in a clean master a panic occurs and with make test the test fails in google-cloud-storage. Running DATABASE=mysql SOURCE= make test also panics. I suppose it is better to leave the task to someone with a working dev environment that can prepare first a failing test.