title: #1452 - Cannot add or update a child row: a foreign key constraint fails on my table
body: <p>I Have 2 tables which is departements and students with this schema on my foreign key</p>
  <pre><code>departements.id = students.departement_id
  </code></pre>
  <p>i tried to delete one of my departement.id but it returns an error with this</p>
  <pre><code>#1452 - Cannot add or update a child row: a foreign key constraint fails (`u1556075_sia_uiii2`.`#sql-f847_33d3d1a`, CONSTRAINT `departements_fk2` FOREIGN KEY (`id`) REFERENCES `students` (`departement_id`)
  </code></pre>
  <p>honestly idk what makes this happen because my foreign key on student is just like this</p>
  <pre><code>ALTER TABLE `students` ADD CONSTRAINT `students_fk2` FOREIGN KEY (`departement_id`) REFERENCES `departements`(`id`) ON DELETE RESTRICT ON UPDATE RESTRICT;
  </code></pre>