Closed chadmv closed 9 years ago
Turns out the issue was a MyISAM vs InnoDB issue. To update to django 1.8, I updated our db to MySQL 5.6 where the default storage engine is InnoDB from 5.0 where the default was MyISAM. The existing tables were MyISAM and the new notifications tables were being created with InnoDB. Once I changed the default storage engine on the db to MyISAM, it works fine.
may i learn from you how you find out the root cause?
I'm upgrading from django 1.6.x to 1.8.x and upgrading from the pre-pinax notification app to the pinax.notifications app. I have all my migrations set and applied. The last is to migrate the notifications. It fails when trying to add the constraint on noticesetting.scoping_content_type. It just says django.db.utils.IntegrityError: (1215, 'Cannot add foreign key constraint')
The django_content_type table has already been migrated but it doesn't seem to want to add this constraint. It's weird because I have many other models that have a ForeignKey to ContentType. I've even tried completely removing notifications and just running the full migrate and I get the same error. Any other ideas?