[Answered ]-Django Two foreign key


Welcome to one of the many reasons why you shouldn’t use MySQL. This happens most often when you have one table that is MyISAM and one table that is InnoDB. Since myISAM doesn’t support FK constraints all hell breaks loose when django creates a FK between the tables.

The fix is to either make both tables InnoDB or MyISAM and not to mix them. Or even better drop the bad RDMS for something not MySQL.


Leave a comment