class QdProjectAssist(models.Model):
project_id = models.ForeignKey('QdProject', on_delete=models.CASCADE)
assist_id = models.ForeignKey('QdAssist', on_delete=models.CASCADE)
sort = models.PositiveIntegerField('排序', blank=True, null=True)
add_time = models.PositiveIntegerField()
uptime = models.DateTimeField( auto_now=True)
class Meta:
managed = False
db_table = 'project_assist'
unique_together = ('project_id', 'assist_id')
我从mysql导出带有两个主键的表。
在使用过程中报告错误:
django.db.utils.InternalError: (1054, "Unknown column 'qd_project_assist.id' in 'field list'")
答案 0 :(得分:0)
如果您处于开发环境中,请尝试删除所有表并再次运行df.groupBy("location").count().show()
。