-
-
Notifications
You must be signed in to change notification settings - Fork 173
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
Error when running Sequel migrations for MySQL DB #33
Comments
Use postgres? I do recommend it, MySQL won't support the functionality we want to add with full text search. I tried to replicate the problem on my machine (Mac Yosemite) using mysql-5.6.26, a fresh database, ruby 2.2.2 and I could not do it. Here are my credentials. Have you set utf8 for the connection?
|
OK, switched to postgres, and everything seems to be working fine at the moment. Related to the MySQL config, FYI, I was on CentOS 6.6, Ruby 2.1.6, MySQL client/devel libs 5.1.73, MySQL server 5.6.24 (on a separate host). Thank you for your help! |
I am having the same issue and this fixed it for me. http://stackoverflow.com/questions/13606469/cannot-change-column-used-in-a-foreign-key-constraint |
Thanks @yadavsaroj. For future reference, was it the LOCK TABLES solution or the FOREIGN_KEY_CHECKS? |
The accepted answer worked for me. Essentially drop the foreign key and modify primary key definition. - |
The easiest thing to do to fix the installation I think would be: (make sure it's the migration number 19_* which failed) |
I guess it's better to remove this from Pact Broker readme if you guys are not going to fix this. |
It seems to work on some MySQL instances, but not others. I'm not sure what the difference is. I originally developed it on MySQL. The problem with adding the SET FOREIGN_KEY_CHECKS in the migration is that it is MySQL specific, and won't run on postgresql. Though we could put a DB type check in there. |
Actually, it looks like I've already had to do a DB check in some other code.
@sk1talets - if you're interested in submitting a PR to make it work, I'd be happy to accept it. I'm on mat leave with 6 month old twins at the moment, so don't have time to work on it myself. |
yes, it's just a workaround/hack for installation with MySQL
sure, will do that |
Good news, mysql users. I've finally managed to reproduce and fix this migration for mysql, thanks to travis now using the trusty image. |
Sorry, we decided not to go the contract based testing approach for now and I couldn't find time to fix that. |
consistent quotes around cookie
Hi,
I'm trying to install pact_broker connecting to a MySQL DB. I'm connecting via the 'mysql2' adapter. DB is empty initially, no tables exist. When I first started pact_broker, I got the error below:
Any idea how to get past this?
Thank you,
R.
The text was updated successfully, but these errors were encountered: