Comment 5 for bug 1473226

Revision history for this message
Doug Shelley (0-doug) wrote :

This issue occurs on all post Mysql 5.6.7 variants. It is described here:
http://stackoverflow.com/questions/17015844/mysql-5-6-foreign-key-constraint-error-didnt-occur-in-5-5

In sqlalchemy/migrate_repo/019-datastore-fix, we are attempting to change a column from NULL to NOT NULL. The column is part of a foreign key - as of Mysql 5.6 (or MariaDB 10) this is no longer allowed by default.

My suggestion would be to change that migrate file to disable foreign_key_checks for the duration of it's run. This will need to be special cased for mysql and I have no idea if the same issue happens on Postgresql.