Bug #60102 Changes in a primary key do not propagate in a relationship
Submitted: 10 Feb 2011 19:26 Modified: 16 Mar 2011 21:41
Reporter: Michael Garcia Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S2 (Serious)
Version:5.2.31a OS:Any
Assigned to: CPU Architecture:Any
Tags: foreign key, forward engineering, relationship

[10 Feb 2011 19:26] Michael Garcia
Description:
Unsigned does not propagate in a relationship
Changes in data type do not propagate in a relationship

This causes forward engineering to fail when using InnoDB. Also, the logs produced by InnoDB do not help you identify which relationship is causing the problem.

This causes a severe waste of time, since you have to check both the data types for each relationship of the table(s) that failed, and the "unsigned" property - which has to be checked by comparing both tables.

I don't see any reason for this to be normal behavior, this is definitely a bug (keys are never of different data types) - and since it causes major waste of time for big models, and doesn't crash the program, I'm filing it as Serious.

How to repeat:
Create a relationship between two tables, doesn't matter if identifying or not
Change the data type in the primary key of the referenced table (example: change from int to tinyint)
The foreign (or primary) key in the referenced table keeps the old data type

Same steps for changing from unsigned to signed and vice-versa: they do not propagate.

Suggested fix:
Changes in one of the keys in a relationship should immediately change the other key of the relationship. Checking "unsigned" should immediately mark "unsigned" on the other key.
[11 Feb 2011 5:10] Valeriy Kravchuk
Thank you for the problem report.
[18 Feb 2011 21:06] Alfredo Kojima
This is a duplicate of feature request/bug #38801