rails/rails — pull request #8054 by senny (2012-10-28 18:12:48+00:00)
Title: create_table raises an ArgumentError when the primary key is redefined.

This patch adds error handling to `create_table` when the primary_key is being redefined.

I added a separate refactoring commit for the `SQLite3Adapter#copy_table` method. This method redefined the primary key multiple times, wich of course raised exceptions with the patch. I looked over the tests for `copy_table` and made some additions to lock the current behavior down before refactoring (I think it would be good to glance over to make sure I didn't forget anything).

Also there might be a better description for the error message, just leave a comment if you got a better text.

This is a fix for #6378