Hi,

I have a table A with a column 'abc' which I want to rename to 'xyz'. 
Column 'abc' being primary key. I have written the following migration to 
do so:

*alter_table :A do*
*   rename_column(:abc, :xyz)*
*end*
*This migration fails with the error: ERROR 1068 (42000): Multiple primary 
key defined*
*Mysql logs shows the query being: ALTER TABLE `A` CHANGE COLUMN `abc` 
`xyz` int(11) NOT NULL PRIMARY KEY*


I reckon this is because we add 'PRIMARY KEY' constraint to alter table 
statement. How can I avoid this?

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sequel-talk/-/syBwyjIzRL4J.
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/sequel-talk?hl=en.

Reply via email to