rails/rails — pull request #6686 by bpo (2012-06-09 02:33:16+00:00)
Title: Fix non sequence pkey dumps

Previously if you had a primary key without a sequence on a db whose connector
responded to :pk_and_sequence_for, the primary key would be missed by the schema
dumper. This fixes that problem by checking :pk_and_sequence_for, then
:primary_key.

Not sure how to go about testing this - it's easy to get into this state in a DB like postgres
by creating a table with a normal sequence ID, then later migrating to drop that ID and
create a new primary key column of e.g. varchar. None of the other tests seem to do
anything like that, though, so I thought I'd ask before venturing out myself.