To support old (legacy) db we have to create a table that using integer field as a foreignkey to User table: This is how our model look like:
user_id = models.IntegerField(null=True, blank=True)
# ..... (other fields) .....
You can use a
ForeignKey field with
db_constraint=False. See the docs for warnings, but legacy invalid data is one of the cases where this is reasonable.