It is impossible to add a non-nullable field 'id' to client without specifying a default. This is because the database needs something to populate existing rows. Please select a fix:
- Provide a one-off default now (will be set on all existing rows with a null value for this column)
- Quit and manually define a default value in models.py.
models.py
from django.contrib.auth.models import AbstractBaseUser
from django.db import models
class Client(AbstractBaseUser):
username = models.CharField(max_length=200)
password = models.CharField(max_length=200, default="")
def __str__(self):
return self.username