Table2:
Command: ALTER TABLE extras ADD FOREIGN KEY (login) REFERENCES usuario(login);
Response: Error Code: 1215. Cannot add foreign key constraint
Can not find an index in the referenced table where the Referenced columns appear as the first columns, or the types columns in the table and the referenced table do not match the restriction. Note that the internal storage type of ENUM and SET has changed in
I can not identify the reason for the error. Can anyone help me?
Ps. as you can see, the two fields are of the same type (varchar (15))
Thank you so much