IntegrityError on loaddata restore into non-empty database with existing primary keys
Restoring fixtures without flushing the target database When using dumpdata to export a Django project's data and loaddata to restore it, the default behavior inserts fixture rows without removing existing rows in the target database. This design leads to primary-key collisions or unique-constraint violations if the destination already contains rows with the