Bug #67208 The alter table DDL genrated by when syncronizing schema is worng
Submitted: 12 Oct 2012 14:33 Modified: 25 Mar 2013 18:26
Reporter: Phil NoticK Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S1 (Critical)
Version:5.2.44 OS:MacOS (Darwin 11.4.0)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[12 Oct 2012 14:33] Phil NoticK
Description:
when taking a modified ER and syncronizig schema back against the orginating database there are many examples of incoorect DDL.

See below where the index that has just been created is then being deleted:
ALTER TABLE `verServices`.`Batch` 
  ADD CONSTRAINT `fk_TVBatch_TVBatchStatus`
  FOREIGN KEY (`batchStatus_id` )
  REFERENCES `verServices`.`BatchStatus` (`batchStatus_id` )
  ON DELETE NO ACTION
  ON UPDATE NO ACTION, 
  ADD CONSTRAINT `fk_TVBatch_Job1`
  FOREIGN KEY (`job_guid` )
  REFERENCES `jobCntrl`.`Job` (`job_guid` )
  ON DELETE NO ACTION
  ON UPDATE NO ACTION, 
  ADD CONSTRAINT `fk_Batch_externalVendor`
  FOREIGN KEY (`externalVendor_id` )
  REFERENCES `verServices`.`ExternalVendor` (`externalVendor_id` )
  ON DELETE NO ACTION
  ON UPDATE NO ACTION
, ADD INDEX `fk_Batch_BatchStandardQuery1_idx` (`standardQuery_id` ASC, `batchType_id` ASC) 
, DROP INDEX `fk_Batch_BatchStandardQuery1_idx` ;

I have also had cases where rather than changing a column the column is dropped and added when there is no name change on the column.

In general with the last couple of releases the schema genration has become almost unusable, I am in the process of evaulating alternative tools.

----- Developer Notes -----

MySQL Workbench CE for Mac OS X version 5.2.44  revision 9933
Configuration Directory: /Users/phil/Library/Application Support/MySQL/Workbench
Data Directory: /Applications/MySQLWorkbench.app/Contents/Resources
Cairo Version: 1.9.1
OS: Darwin 11.4.0
CPU: 8x Intel(R) Core(TM) i7-2760QM CPU @ 2.40GHz, 8.0 GB RAM

How to repeat:
reverse engineer a schema from the database
make changes
syncronize the schema
[15 Oct 2012 13:40] Phil Notick
I was in a rush and made some spelling mistakes wrong -. wrong, incorrect -> incorrect
[25 Feb 2013 18:26] Armando Lopez Valencia
Hello Phil.
Can you please add a SQL Dump and the model that you use to reproduce this error?
Thanks.
[26 Mar 2013 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".