[Answered ]-Resetting databases with having OneToOneField crossing different applications in Django

2πŸ‘

βœ…

One step that can make manually resetting easier is (and avoid the dread ERROR 1217):

SET foreign_key_checks = 0

From http://dev.mysql.com/doc/refman/5.1/en/innodb-foreign-key-constraints.html:

InnoDB does not allow you to drop a
table that is referenced by a FOREIGN
KEY constraint, unless you do SET
foreign_key_checks = 0. When you drop
a table, the constraints that were
defined in its create statement are
also dropped.

πŸ‘€J. Heasly

Leave a comment