i have an error in my django admin:
(1054, "Unknown column 'flora2estado.id' in 'field list'")
the model flora2estado has two fields, they are used in unique together as a pseudo composite key, how can i fix this?
admin.py
admin.site.register(Flora2Estado)
models.py
estado = models.OneToOneField(Estados, models.DO_NOTHING, primary_key=True)
especie_id = models.IntegerField()
flora2estado = models.IntegerField(blank=True, null=True)
class Meta:
managed = False
db_table = 'flora2estado'
unique_together = (('estado', 'especie_id'),)
I tried to add the "flora2estado" field without sucess.
All migrations done, thank you for your time
question from:
https://stackoverflow.com/questions/65833607/unkown-column-error-on-django-admin-how-to-fix-it 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…