Reputation: 64739
I'm trying to do manage.py loaddata myfixture.json
to purposely bulk overwrite several records in my database. However, it gives me the error:
IntegrityError: Problem installing fixture 'myfixture.json': Could not load myapp.Person(pk=1): (1062, "Duplicate entry 'Bob' for key 'name'")
I thought the behavior of loaddata was to overwrite the records if primary key matches an existing record? Am I wrong, or was this changed in Django 1.5? How do I get it to overwrite?
Upvotes: 8
Views: 4891