0

I am using django and have a migration that includes fixture to have some initial data loaded into the web app. I additionally have other data that has been added by users, that isn't included in the fixture.

My question is this: if I create and apply a new migration to bring in new functionality into my app, will the data that has been user-generated still be displayed (I know the data in the fixture will be)?

sharataka
  • 5,014
  • 20
  • 65
  • 125

1 Answers1

0

dumpdata would typically produce the json as:

[{"pk": 1, "model": "app_name.model", "fields": {"field1": "value1", "field2": "value2", }}, {"pk": 2, "model": "app_name.model", "fields": {"fiel1": "value2", "field2": "value2",  }}]

This means that it would overwrite pk1, pk2 if it exists for the model.

So, user content would be overwritten if the key is conflicting.

karthikr
  • 97,368
  • 26
  • 197
  • 188