1👍
✅
You can manually specify an column name for a model field with the db_column setting.
class PARTS(models.Model):
partid = models.IntegerField(primary_key = True)
productid = models.ForeignKey(PRODUCTS, related_name = 'parts', db_column='productid')
👤Tim
Source:stackexchange.com