Bug #104921 Table template unique key is not indicated until forward engineering
Submitted: 13 Sep 2021 6:02 Modified: 13 Sep 2021 8:24
Reporter: christiani igot Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:8.0.26 OS:Windows (Microsoft Windows 10 Home)
Assigned to: CPU Architecture:x86
Tags: WBBugReporter

[13 Sep 2021 6:02] christiani igot
Description:
When creating a table template in the ERD a unique primary key, it is not indicated as such until viewing the SQL script during forward engineering. This unique key flag will also propagate to foreign keys associated with the originating key with no indication. Toggling the checkbox for any of the keys (both the original, and the foreign keys) will not remove the unique flag, even when there is no check for its associated checkbox.

How to repeat:
-create template in ERD where the primary key has the unique flag set
-create table with that template
-edit that table and note that the UQ flag is unchecked
-forward engineer and note that the UNIQUE flag is set
-go back to ERD
-create another table that has a foreign key to the first table
 and note that the  UQ flag is unchecked
-forward engineer and note that the UNIQUE flag is set for the foreign key

Suggested fix:
1. Make it so that the UQ checkbox of a table created from a template correctly indicates that the key is unique
2. Make it so that the UQ checkbox is able to modify the unique flag of the associated key for that table
[13 Sep 2021 6:23] christiani igot
Also note that setting the UQ in the ERD does not set it at all upon reaching forward engineering.  It seems like the only way to set it is through a table template or by editing the SQL script at the end.
[13 Sep 2021 8:24] MySQL Verification Team
Hello!

Thank you for the report and feedback.

regards,
Umesh