I get the following error while trying to run the command python manage.py makemigrations invigilators
:
django.db.utils.ProgrammingError: (1146, "Table 'mydatabase.invigilators_shift' doesn't exist")
class Shift(models.Model):
shiftName = models.CharField(max_length=255,blank=False,unique=True)
exam = models.ForeignKey(Exam,on_delete=models.CASCADE,related_name="shifts")
startTime = models.TimeField()
endTime = models.TimeField()
def __str__(self):
return self.shiftName
I have already cleared all previous migrations and an empty database is already created.