I have a little problem making some foreign keys...
When I try to define the foreign key in MySQL Workbench, I get the following message:
Selected column 'playerName' must be indexed and be of a compatible type for a Foreign Key to be created.
There my problem starts: I'm pretty sure, that the column (towns.playerName) is indexed and it's definitively of the same type ( VARCHAR(255) )...
Indexes of 'towns'
I want to add a Foreign Key from players.name (primary key, not null, unique)
to towns.playersName(not null)
.
So what can I do to get the foreign key created?
It seems i am doing something wrong...
PS: I'm sorry, if there is already a question for this...
EDIT: I just tried again (exactly as I did before several times) and now it works... really strange
Perhaps a bug in MySQL Workbench??