如果在进行IAM迁移时将新模型添加到现有模型,则会发生此错误1146表不存在

时间:2019-07-11 04:53:29

标签: python-2.7 django-rest-framework

我使用了 mysql 数据库, python2.7 django rest框架

class Appointment(models.Model):
    patient = models.ForeignKey(Patient,on_delete=models.SET_NULL, null=True,blank=True)
    doctor = models.ForeignKey(Doctors)
    standardchoices = models.ForeignKey(Choices)
    slotchoices = models.TextField(null=True, blank=True)
    # department=models.ForeignKey(Departments)
    # approvedby=models.ForeignKey(Staff, default=None)
    bookingdate = models.DateField(null=True)
    bookingtime = models.TimeField(null=True)
    # statusofappointment=models.PositiveSmallIntegerField(choices=types)

0 个答案:

没有答案