Renaming primary key column in MYSQL

26 views
Skip to first unread message

pravin battula

unread,
Jul 23, 2012, 6:03:32 AM7/23/12
to migrat...@googlegroups.com
Hi,

I'm getting below error while trying to rename a primary key column.
OperationalError: (OperationalError) (1025, "Error on rename of '.\\test\\#sql-540_8' to '.\\test\\users' (errno: 150)") '\nALTER TABLE users CHANGE COLUMN user_id `Users_Id` INTEGER NOT NULL AUTO_INCREMENT' ()

Below is the code i used to alter the column.
alter_column(users.c.user_id, name='Users_Id')

Please do the needful

Regards
Pravin B
Reply all
Reply to author
Forward
0 new messages