-
Notifications
You must be signed in to change notification settings - Fork 326
MySQL Driver #1
Comments
I added experimental support for mysql migrations. The issue is that there is no golang mysql driver that supports multiple sql statements per query. So the mysql driver splits sql statements by semicolons Goose uses some custom split strings to format sql migrations. I really would like to avoid that. Is there a golang mysql driver that supports multiple sql statements? |
Makes it possible to run several queries in each file.
Hi I like what you did, great job! Keep up the good work. I came here to ask you a little question, I'm using migrate in my project with MySQL. I know it's still under development, no worries there. It came to my attention that when my program runs and that there is an up migration to do (I added a table for example), migrate does it just fine, no problem with that, but I can't halt my app with ^C anymore. If migrate runs something against my database, then I can't stop my program anymore. I don't know if it is related to the MySQL driver, but maybe you can point me in a direction while I'm looking into it, it could go faster! It might be on my side too. Thanks, a lot, and by the way, I looked into the driver and tried a pull request to handle multiple statement but it was closed. You can see my pull request here : go-sql-driver/mysql#296 |
Thanks!
When a migration is running and you hit ^C
It's too bad
|
see also #39 |
For cases like yours, you can also use the driver by its database/sql/driver interface ( |
I never used it, but https://github.com/ziutek/mymysql#example-4---multi-statement--multi-result looks promising. If you want to give it a try, go for it. Will definitely merge if it works. |
okay, @mattes I will start to work on it soon. |
I'd like to use
and this cause a panic because in the same package I also have to import the mysql package that does the same. There is a way to prevent that? Thanks! |
I'm surprised, because the mysql driver registers with https://github.com/mattes/migrate/blob/master/driver/registry.go which is unrelated from the any other mysql driver. |
Actually the "mysql" name is used both by your driver and by https://github.com/go-sql-driver/mysql/blob/master/driver.go |
You can rename the package when you import:
|
This won't solve the problem, because in these two files I'm importing they are creating a driver with the same name, as it will panic https://github.com/go-sql-driver/mysql/blob/master/driver.go : line 148 |
Ok, I misunderstood your problem. |
Can you send the panic log? |
|
any news? |
What about this? |
+1 |
Running into the same issue as @alecha. |
use a non-zero exit code when no command is given
No description provided.
The text was updated successfully, but these errors were encountered: