"Gustavo de Sá Carvalho Honorato" <gustavohonorato wrote in post
#968329:
> Hi,
>
> after changing a primary key column name, the auto-increment information
> (MySQL) and sequence (Oracle) are lost.
So what? The actual value of the key should never be significant
anyway.
> What is the correct way to
> rename
> primary keys?
rename_column :table, :key, :id
>
> Thanks,
> Gustavo
Best,
--
Marnen Laibow-Koser
http://www.marnen.org
marnen@marnen.org
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment