'NOT NULL constraint failed: new__BRS_user.tables_id
When i'm trying to migrate the User model, NOT NULL constraint failed: new__BRS_user.tables_id error appears
There is no field named tables in my model, it was removed long ago.
class User(Model):
id = models.AutoField(primary_key=True)
first_name = models.CharField(max_length=60)
second_name = models.CharField(max_length=60)
third_name = models.CharField(max_length=60)
email = models.CharField(max_length=320, unique=True)
password = models.CharField(max_length=127)
is_admin = models.BooleanField(default=False)
is_student = models.BooleanField(default=True)
is_teacher = models.BooleanField(default=False)
input = models.OneToOneField(Input, on_delete=models.CASCADE, null=True)
Class = models.IntegerField()
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
