django/django — pull request #238 by lorin (2012-07-30 19:21:57+00:00)
Title: Fix #12728 - Use proper pk column for postgresql when setting sequences

PostgreSQL was hard-coded to use the 'id' column when generating SQL to set the sequence on the models of many-to-many relations. This breaks when the relation uses table-based inheritence, where the primary key will not be named 'id'.

This change uses the actual primary key column name.

Fix #12728