Kategorien
Debugging Doctrine ORM Frameworks MySQL Symfony2

SQL General error – 1553 Cannot drop index XYZ needed in a foreign key constraint

// show indexes of table
SHOW CREATE TABLE news;

// shows something like this
...
CONSTRAINT `FK_3A51546D12469DE2` FOREIGN KEY (`category_id`) REFERENCES `news_category` (`id`),
...

// drop index
ALTER TABLE news DROP FOREIGN KEY FK_3A51546D12469DE2;