I need to create a foreign key in a database that I have in phpmyadmin. The database consists of 4 tables, all of them already contain data. One of the three tables is related to the rest of them. All the columns in the main table have an index but an error appears when trying to create the foreign keys. Any solution?
This is the error: