I am using model inheritance in my models.py. This is my code:
class Email(models.Model):
stuff = models.CharField(max_length=40, blank=True,
null=True, default="")
class TypeMod(Email):
pass
When I run makemigrations, I get the following message although I have set the default value for all of my fields in the Email model:
You are trying to add a non-nullable field 'id' to typemod without a default; we can't do that (the database needs something to populate existing rows). Please select a fix: 1) Provide a one-off default now (will be set on all existing rows with a null value for this column) 2) Quit, and let me add a default in models.py
What am I doing wrong?!