http://rails.lighthouseapp.com/projects/8994/tickets/1766-patch-sqlite-adapters-copy_table-should-not-set-id-true-if-id-is-not-a-primary-key

Sqlite adapter's copy_table should not set :id => true if :id is not a
primary key.

We had a legacy table with a string id. Changing the table was not a
good option, according to people more important than me. We had to
maintain this structure in development, so created an id column that
was not a primary_key.

Later I tried to call:   remove_column :table, :value

And upon calling remove_column, the whole thing blew up. When
SQLiteAdapter tried to call copy_table, it set :id => true and wrote
over the original id column.

The patch will set :id => false if there is an :id column, but it's
not a primary_key.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to