Ошибка внешнего ключа MySQL Drop 152

Я пытаюсь удалить несколько внешних ключей, используя:

ALTER TABLE `table` DROP FOREIGN KEY `fk_table_users1`, DROP FOREIGN KEY `fk_table_accounts1`, DROP FOREIGN KEY `fk_table_data1` ;

но возвращает ошибку:

Error on rename of './db/table' to './db/#sql2-179c-288289' (errno: 152)

Я запустил SHOW ENGINE INNODB STATUS, который говорит:

120725 12:38:37 Error in dropping of a foreign key constraint of table db/table,
in SQL command
ALTER TABLE `table` DROP FOREIGN KEY `fk_table_users1`, DROP FOREIGN KEY `fk_table_accounts1`, DROP FOREIGN KEY `fk_table_data1` 
Cannot find a constraint with the given id fk_table_users1.

SHOW CREATE TABLE 'table'выход:

CREATE TABLE `table` (
 `id` int(11) NOT NULL auto_increment,
 `data_id` int(11) NOT NULL,
 `account_id` int(11) NOT NULL,
 `status` enum('pending','complete') NOT NULL default 'pending',
 `created_at` datetime NOT NULL,
 `created_by` int(11) NOT NULL,
 PRIMARY KEY  (`id`),
 KEY `fk_orders_users1` (`created_by`),
 KEY `fk_orders_data1` (`data_id`),
 KEY `fk_orders_accounts1` (`account_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8

Однако, когда я смотрю на структуру через phpmyadmin, она отображает внешний ключ с тем же именем. Нужно ли мне делать что-то еще, прежде чем я смогу удалить внешние ключи?

13
задан xylar 25 July 2012 в 12:14
поделиться