Monday, March 7, 2011

MySQL - OperationalError: Error on rename (errno: 150)

Trying to execute:

alter table `bismark`.`d_area` drop index `tipo_area_id`

You Get:

Error on rename of '.\bismark\#sql-93c_1' to '.\bismark\d_area' (errno: 150)

You have to delete first the foreign key.

ALTER TABLE d_area DROP FOREIGN KEY tipo_area_id_FK;


Then you can drop the index and the column :D


No comments: