Typically, an instrument contains all of the model information, which includes a primary key. Below is an example of a device from the Django website:
[ { "model": "myapp.person", "pk": 1, "fields": { "first_name": "John", "last_name": "Lennon" } }, { "model": "myapp.person", "pk": 2, "fields": { "first_name": "Paul", "last_name": "McCartney" } } ]
As you can see, he has a primary key. This way, even if you have duplicated fixtures, if the primary keys are the same, no matter what is imported last, it will overwrite records in db, so you should not have duplicate data in db.
source share