Description

to_field shouldn't appear in the migration for a ForeignKey to settings.AUTH_USER_MODEL, otherwise the migration isn't usable if settings.AUTH_USER_MODEL uses a primary key with a name different than 'id'.

It's not necessary to include the field name, the default behavior of models.ForeignKey is to look up the primary key field name from the target model.