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

Doctrine Migrations fail in MySQL 5.6+ #1449

Closed
thecoolestguy opened this issue Jun 9, 2016 · 2 comments
Closed

Doctrine Migrations fail in MySQL 5.6+ #1449

thecoolestguy opened this issue Jun 9, 2016 · 2 comments
Labels

Comments

@thecoolestguy
Copy link
Member

When running the 'bin/console doctrine:migrations:migrate --env=prod' command when upgrading from an Ilios 2.x installation, some migrations fail because they attempt to change the structure of a column that is referenced in a previously-set FOREIGN KEY CONSTRAINT (see here: http://stackoverflow.com/questions/17015844/mysql-5-6-foreign-key-constraint-error-didnt-occur-in-5-5)

I've tried the the workaround suggested and dropped the FKC before altering the column and then recreating it after, and it works, but we need to change the migrations in several places. I will list this places in this issue as they are discovered.

@mtb3
Copy link

mtb3 commented Jun 23, 2016

I encountered this issue in my environment with MySQL 5.6.

Dropping the FKC in the migrations per the commit mentioned above does work to solve this issue for me.

@thecoolestguy
Copy link
Member Author

This is fixed in #1451

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

No branches or pull requests

2 participants