Description

I've run into issues with Postgres and Oracle (so I'd assume other backends are affected) not being able to migrate a model from an auto primary key to a natural primary key, where another model has a foreign key that points at the natural.

It looks like the primary issue here is the ForeignKey repointing not working correctly with the to_field argument. Not categorising as RB for now as it's a lesser-used feature and nothing in migrations is technically a regression.