Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
DB dumps do not disable foreign key checks #440
Is it just about adding a "SET FOREIGN_KEY_CHECKS=0;" before the DROP-Statements and "SET FOREIGN_KEY_CHECKS=1;" after them? Or is the solution more complicated?
I think that should be fine.
If you look at an SQL dump produced by mysqldump you will see it saves the original FOREIGN_KEY_CHECKS setting instead of assuming it was 1.
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0
and at the end...