Bug #48728 | Can't create unique index on foreign key | ||
---|---|---|---|
Submitted: | 12 Nov 2009 13:49 | Modified: | 21 Apr 2010 15:30 |
Reporter: | Petr Burian | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Workbench: Modeling | Severity: | S3 (Non-critical) |
Version: | 5.1.18 | OS: | Linux (Kubuntu 9.10) |
Assigned to: | Alfredo Kojima | CPU Architecture: | Any |
Tags: | foreign key, unique index |
[12 Nov 2009 13:49]
Petr Burian
[12 Nov 2009 13:49]
Petr Burian
MWB to simulate unique index
Attachment: unique.mwb (application/octet-stream, text), 4.78 KiB.
[18 Apr 2010 0:17]
Alfredo Kojima
Changed the FK/index mapping implementation so that indexes created for foreign keys are no longer required to be marked as "FOREIGN". They now are created with type "INDEX" and can be changed to UNIQUE or other types.
[19 Apr 2010 21:06]
Alfredo Kojima
marked bug #50462 as duplicate
[21 Apr 2010 11:20]
Johannes Taxacher
fix confirmed in repository.
[21 Apr 2010 15:30]
Tony Bedford
An entry has been added to the 5.2.20 changelog: The FK/index mapping implementation has been changed so that indexes created for foreign keys are no longer required to be marked as FOREIGN. They now are created with type INDEX and can be changed to UNIQUE or other types. Although, the artificial FOREIGN index type has been removed, MySQL Workbench still automatically creates and maintains indexes for each foreign key by naming them after the keyname and keeping the names (FK to IDX) synchronized.