Bug #115055 Cannot select a column for foreign key creation
Submitted: 17 May 19:52 Modified: 16 Sep 13:34
Reporter: Ivan Berkovich Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:8.0.36 OS:Windows (Microsoft Windows 10 Pro)
Assigned to: CPU Architecture:x86
Tags: WBBugReporter

[17 May 19:52] Ivan Berkovich
Description:
----[For better reports, please attach the log file after submitting. You can find it in C:\Users\Alex\AppData\Roaming\MySQL\Workbench\log\wb.log]

Cannot select a column when trying to create a foreign key (`contacts` table , field user_id of type INT referencing column id of `users` table which is PK).

How to repeat:
Create 2 tables:

CREATE TABLE users
(
      id INT PRIMARY KEY,
      name VARCHAR(255) NOT NULL,
      email VARCHAR(255) NOT NULL,
      access_token VARCHAR(255) NOT NULL DEFAULT ''
);

CREATE TABLE contacts
(
      id INT PRIMARY KEY,
      user_id INT NOT NULL,
      mobile_phone VARCHAR(50)
);

Then try to create a foreing key for `contacts` table.
[21 May 13:23] MySQL Verification Team
Hello Ivan Berkovich,

Thank you for the bug report.
I tried to reproduce your issue on windows 11 with workbench 8.0.36 using tables given but I am not seeing any issues at my end. Please provide screenshot of the issue.

Regards,
Ashwini Patil
[16 Sep 13:34] Ivan Berkovich
Sorry, now I can't reproduce it too. Maybe it was a temporary bug.