胡超
2018-11-14 08:55:43 UTC
class QdProjectAssist(models.Model):
'''
页é¢æšè
'''
# id = models.AutoField('äž»é®', primary_key=True)
project_id = models.ForeignKey('QdProject', verbose_name='项ç®', on_delete=models.CASCADE)
assist_id = models.ForeignKey('QdAssist', verbose_name='æ£æ', on_delete=models.CASCADE)
sort = models.PositiveIntegerField('æåº', blank=True, null=True)
addtime = models.PositiveIntegerField('æ·»å æ¶éŽ')
uptime = models.DateTimeField('æŽæ°æ¶éŽ', auto_now=True)
class Meta:
managed = False
db_table = 'qd_project_assist'
unique_together = ('project_id', 'assist_id')
verbose_name = '页é¢æšè'
verbose_name_plural = verbose_name
I export the table with two primary keys from mysql.
Reporting errors in the course of use
django.db.utils.InternalError: (1054, "Unknown column 'qd_project_assist.id' in 'field list'")
'''
页é¢æšè
'''
# id = models.AutoField('äž»é®', primary_key=True)
project_id = models.ForeignKey('QdProject', verbose_name='项ç®', on_delete=models.CASCADE)
assist_id = models.ForeignKey('QdAssist', verbose_name='æ£æ', on_delete=models.CASCADE)
sort = models.PositiveIntegerField('æåº', blank=True, null=True)
addtime = models.PositiveIntegerField('æ·»å æ¶éŽ')
uptime = models.DateTimeField('æŽæ°æ¶éŽ', auto_now=True)
class Meta:
managed = False
db_table = 'qd_project_assist'
unique_together = ('project_id', 'assist_id')
verbose_name = '页é¢æšè'
verbose_name_plural = verbose_name
I export the table with two primary keys from mysql.
Reporting errors in the course of use
django.db.utils.InternalError: (1054, "Unknown column 'qd_project_assist.id' in 'field list'")
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+***@googlegroups.com.
To post to this group, send email to django-***@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/117bd094-09bd-429c-a289-0074de2374f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+***@googlegroups.com.
To post to this group, send email to django-***@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/117bd094-09bd-429c-a289-0074de2374f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.