Bug #76782 Unique constraint on a tempate column creates unremovable hidden index in model
Submitted: 22 Apr 2015 6:39 Modified: 22 Apr 2015 9:56
Reporter: Jonas Stenberg Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:6.2.5 OS:Linux (Ubuntu 14.04.2 LTS)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[22 Apr 2015 6:39] Jonas Stenberg
Description:
In my workbench model I have created a table from a template. One of the columns in my template has a unique constraint (the unique checkbox is ticked). Once the table is created, there seems to be a hidden index for the unique constraint that cannot be removed. When I synchronize this to my database, two unique indexes are created on the same column in the target database. The additional index gets the same name as the column. When I synchronize a second time, the workbench first removes the additional index, then it is created again automatically. This is quite annoying when the table contains a lot of data because it takes a while to generate an index and even more serious: I cannot see any way to remove this hidden unique constraint from the table. 

How to repeat:
1. Create a template with the Unique checkbox ticked on a varchar column.
2. Create a table from this template.
3. Synchronize this table to a database.
4. Check the result indexes in the target database. There are now two unique indexes on the same column.

Suggested fix:
Make sure that any unique constraint created from template are visible and removable as any other unique constraints.
[22 Apr 2015 9:56] MySQL Verification Team
Thank you for the report.
I could not repeat this issue at my end on Ubuntu 14.04, Win7 with WB 6.2.5/6.3.2. Could you please provide screenshot of the template to reproduce at our end?

If you can provide more information, feel free to add it to this bug and change the status back to 'Open'.

Thank you for your interest in MySQL.

Thanks,
Umesh
[4 Jun 2015 9:57] Leo Wong
Hi,

I got same issue, here is the version on debian.
MySQL Workbench CE (GPL) 6.2.3 12312  build 2280 

Thank you.