Answer the question
In order to leave comments, you need to log in
Error: 150 "Foreign key constraint is incorrectly formed" when creating a new table?
The manga_tag table already existed. But it disappeared after I tried to change the foreign key. An error occurred and the table disappeared. Now, when I try to create this table again, I get this error:
#1005 - Невозможно создать таблицу `table`.`manga_tag` (ошибка: 150 "Foreign key constraint is incorrectly formed")
SELECT * FROM information_schema.KEY_COLUMN_USAGE WHERE TABLE_SCHEMA ='table' AND CONSTRAINT_NAME <>'PRIMARY'
Answer the question
In order to leave comments, you need to log in
I solved the problem by exporting and importing back the entire database.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question