drnic/composite_primary_keys — pull request #76 by tomhughes (2011-11-18 10:16:43+00:00)
Title: Make polymorphic has_many work in rails 3.1.1

It seems polymorphic has_many also changed in rails 3.1.1 although the resulting failure was more subtle in that is just stopped adding the type part of the constraint.

This commit fixes that, and generally updates add_constraints to match the current (rails 3.1.2) code modulo the cpk specific changes.