При переносе устаревшей базы данных postgresql возникла следующая ошибка. Как это исправить?
Ошибка:
timesheet.ImSearchObjectTypes.object_type: (models.E006) The field 'object_type' clashes with the field 'object_type_id' from model 'timesheet.imsearchobjecttypes'.
Модель:
class ImSearchObjectTypes(models.Model):
object_type_id = models.IntegerField(primary_key=True)
object_type = models.ForeignKey(AcsObjectTypes, models.DO_NOTHING, db_column='object_type', blank=True, null=True,
related_name="%(app_label)s_%(class)s_object_type",
related_query_name="%(app_label)s_%(class)ss",)
rel_weight = models.DecimalField(max_digits=5, decimal_places=2, blank=True, null=True)
class Meta:
managed = False
db_table = 'im_search_object_types'