Unknown column 'boericke_joints.id' in field list

4 views
Skip to first unread message

Rishi Raj Jain

unread,
Jun 10, 2019, 7:18:50 AM6/10/19
to Django users
I'm using an already existing database and I followed steps in the documentation.
It connects fine, but when I try to view data already in the database I get the error:
(1054, "Unknown column 'boericke_joints.id' in 'field list'")
I added a primary Id key that's required by django but I keep getting the same error. I also did migrate command. Kindly help solve this issue. Thanks in advance.



models.py is as follows:

class BoerickeJoints(models.Model):
id = models.IntegerField(primary_key=True)
medicine = models.CharField(max_length=75, blank=True, null=True)
section = models.CharField(max_length=100, blank=True, null=True)
details = models.TextField(blank=True, null=True)

class Meta:
db_table = 'boericke_joints'
Reply all
Reply to author
Forward
0 new messages