Kategorien
Debugging Doctrine ORM Frameworks MySQL Symfony2

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

1
2
3
4
5
6
7
8
9
10
// 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;