etianen/django-reversion — pull request #301 by aivins (2014-04-14 06:48:53+00:00)
Title: Derive pk column name dynamically for Users.User table in initial migration

Our __Users.User__ class was an __AbstractUser__ subclassing one of our own models, __Person__. In our database, the pk of the __users_user__ table was __person_ptr_id__. Reversion's __0001_initial__ migration was failing to make a foreign key because __users_user.id__ did not exist. Changing __id__ in the frozen ORM to __User._meta.pk.column__ works for me.