Bug #69153 Synchronize database for column name change drops all foreign key constraints
| Submitted: | 6 May 2013 10:40 | Modified: | 28 Jun 2013 9:25 |
|---|---|---|---|
| Reporter: | Bruce Steedman | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Workbench: Modeling | Severity: | S2 (Serious) |
| Version: | 5.2.47 | OS: | MacOS (10.8.3) |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | dropped, foreign key, synchronize | ||
[6 May 2013 10:40]
Bruce Steedman
[6 May 2013 10:41]
Bruce Steedman
Weird code generated by synch
Attachment: SQL.txt (text/plain), 7.05 KiB.
[6 May 2013 10:42]
Bruce Steedman
Weird code generated by sync
Attachment: SQL.txt (text/plain), 7.05 KiB.
[6 May 2013 11:23]
MySQL Verification Team
Thank you for the bug report. Could you please provide your model project file?. Thanks.
[6 May 2013 11:32]
Bruce Steedman
Model
Attachment: Microarray.mwb (application/octet-stream, text), 18.81 KiB.
[6 May 2013 12:34]
MySQL Verification Team
"Changed a table column name in the model and synchronized....". Please elaborate which change you did (table/column). Thanks.
[6 May 2013 12:38]
Bruce Steedman
This bit of code shows the table/column name modified. This worked. Changing the name back to original name threw up the extra FK code ALTER TABLE `Microarray`.`QTL` CHARACTER SET = utf8 , COLLATE = utf8_general_ci , DROP COLUMN `RightFM` , ADD COLUMN `RightF` INT(11) NULL DEFAULT NULL AFTER `QTL_trait` ;
[8 May 2013 13:44]
MySQL Verification Team
Thank you for the feedback. I did: Synchronize Model with a live server 5.6.11 and after completed without problems back to model changed the column name RightFM to RightF and saved the model. Synchronized again without problems. So please check that is the same steps you did. Thanks.
[8 May 2013 15:52]
Bruce Steedman
Sync I was performing was with a locally hosted database (through MAMP) with the following settings:- Hostname = localhost Port = 8889 Please advise if you can replicate the issue with these settings. Thanks
[8 May 2013 20:42]
MySQL Verification Team
Alter Table
Attachment: alter_table.png (image/png, text), 331.79 KiB.
[8 May 2013 20:45]
MySQL Verification Team
It continues without problems however I noticed the alter table statement a bit different than yours (I had not modified your model) please see the prior attached screen-shot. Thanks.
[9 May 2013 15:45]
MySQL Verification Team
http://bugs.mysql.com/bug.php?id=69181 marked as duplicate of this one.
[9 May 2013 16:10]
Bruce Steedman
Thanks - #69181 is better write up than mine! Will try and compare the alter table statements, to see if this is the cause.
[14 May 2013 11:12]
Jan de Vries
The same thing is happening to me when there is a difference in a column's default value (i.e.: the model specifies none/empty, but the server specifies "0"): upon synchronizing, Workbench does a "CHANGE" on that specific column ánd drops & readds all of the table's foreign keys.
[22 Jun 2013 3:36]
Alfredo Kojima
Posted by developer: The bug was fixed in the 6.0 branch
[27 Jun 2013 23:09]
Philip Olson
Fixed as of the upcoming MySQL Workbench 6.0.3 release, and here's the changelog entry: Executing "Synchronize Model" against two tables that were identical except for the order that the indexes were created, would cause MySQL Workbench to drop and immediately re-add the foreign keys. Thank you for the bug report.
[28 Jun 2013 9:25]
Bruce Steedman
Great to hear Philip - look forward to seeing 6.0.3 Thanks Bruce
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.046 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.