For an old project need, the developer of the time created a field in the table that is not a primary key but is self-incrementing, but django returns an error because it can not update that field. The use of Django's AutoField type is intended for the primary key, it can not be used in that case, but I do not know if there is any way to map the table correctly.
Example of a template representing the video table.
class Video(models.Model):
id = UUIDField(db_column='ID', default=uuid.uuid4, auto=True)
titulo = models.CharField(null=False, max_length=200, db_column='DsVideo')
order = models.IntegerField(db_column='order')
The field "order" is that this in the database is auto incremental, but when saving, the error Can not update identity column 'order'
is returned.