Timeline for MySQL ignores foreign keys constraints in a table representing a many to many relationship
Current License: CC BY-SA 3.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 17, 2017 at 22:23 | comment | added | Ian Roberts | Glad I could help. :) | |
Aug 17, 2017 at 8:42 | vote | accept | Lee Dat | ||
Aug 16, 2017 at 11:42 | comment | added | Ian Roberts | Just a little sense check too. Were the tables InnoDB originally, or did you change them to InnoDB? If they were MYISAM originally, then although it would not have errored, it would not have actually created the Foreign Keys so try creating the Foreign Keys on the table again. ALTER TABLE course_inscription ADD FOREIGN KEY course_inscription_ibfk_1 (idSubject) REFERENCES subject(idSubject); ALTER TABLE course_inscription ADD FOREIGN KEY course_inscription_ibfk_2 (idStudent) REFERENCES student(idStudent); | |
Aug 16, 2017 at 11:34 | comment | added | Ian Roberts | Very strange. With regards to @rathishDBA 's comment (Sorry, I'm not able to post comments yet), run the command from the mysql command line client to check that constraint checking is enabled. | |
Aug 16, 2017 at 11:06 | history | edited | Marco | CC BY-SA 3.0 |
added 21 characters in body
|
Aug 16, 2017 at 10:13 | comment | added | Lee Dat | it doesnot work too even though I've set all their engine to InnoDB | |
Aug 16, 2017 at 10:02 | review | First posts | |||
Aug 16, 2017 at 11:06 | |||||
Aug 16, 2017 at 9:59 | history | answered | Ian Roberts | CC BY-SA 3.0 |