-3

You are trying to add a non-nullable field 'owner' to product without a default; we can't do that (the database needs something to populate existing rows

  • the error message mentioned exactly what the problem is, not sure what the question here is – Phu Ngo Feb 19 '20 at 05:48
  • Does this answer your question? [You are trying to add a non-nullable field 'new\_field' to userprofile without a default](https://stackoverflow.com/questions/26185687/you-are-trying-to-add-a-non-nullable-field-new-field-to-userprofile-without-a) – wfehr Feb 19 '20 at 06:32

1 Answers1

1

Put in null=True, It will make your model field accept null values and also gives them null if you don't give them a value.

E.g:

owner = models.CharField(max_length=255, null=True)

OR

you can put in a default for your model field

owner = models.CharField(max_length=255, default='Some String')
Steven
  • 518
  • 2
  • 4
  • 12