The error incorrect index nameoccurs when you try to create a new index with the same name as the existing index.
MySQL, , FOREIGN KEY (f7) REFERENCES testTable2 (id) ON DELETE CASCADE ON UPDATE CASCADE, . f7.
; : ALTER TABLE testTable ADD UNIQUE (f7); - .
, , :
SHOW INDEXES FROM testTable;
, , , , f7. CREATE TABLE, - , :
FOREIGN KEY fk_testTable_f7 (f7) REFERENCES testTable2 (id) ON DELETE CASCADE ON UPDATE CASCADE
fk_testTable_f7, fk_testTable_f7. , ALTER, , , .