The following diagram is from my database Database schema
I have the following model that represents that schema:
class Finalproduct (models.Model):
idfinalproduct = models.AutoField(primary_key=True)
idproduct = models.ForeignKey('Product',on_delete=models.CASCADE)
idtaste= models.ForeignKey('Taste', on_delete=models.CASCADE)
idpresentation = models.ForeignKey('Presentation', on_delete=models.CASCADE)
idcategory = models.ForeignKey('Category', on_delete=models.CASCADE)
cantidad = models.IntegerField()
class Meta:
unique_together = (("idproduct","idtaste","idpresentation","idcategory"),)
The cantidad field is not being added in my database table finalproduct. The following is the result of the migration in MySql: Mysql, table generated with model shown above
I have tried deleting my database, migrations, and the problem is never solved.