Bug #84866 Synchronize Model FOREIGN_KEY_CHECKS
Submitted: 7 Feb 2017 17:23 Modified: 7 Mar 2017 22:16
Reporter: Brian Harrison-Dorval Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S2 (Serious)
Version:6.3.7 OS:MacOS (10.12.3)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[7 Feb 2017 17:23] Brian Harrison-Dorval
Description:
When synchronizing a model, I create two tables one need the other.
On execute it create the "parent" table and it give an error that it can't create the "child" table because the table doesn't exist, so I have to rerun the entire Synchronize process to add the table again.
I though it was because of the table name but the order are correct the "parent" table in the script is create first...

Not sure if it happen every time, but really often!

It should not check the foreign key if I check the script... :
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';

How to repeat:
Create a table : "my_table_parent"
Create a table : "my_table_child"

Add a foreign key to the my_table_child with the ID of the my_table_parent

Try to synchronize.

On execute it create the "parent" table and it give an error that it can't create the "child" table because the table doesn't exist, so I have to rerun the entire Synchronize process to add the table again.
[7 Feb 2017 22:16] MySQL Verification Team
Please try version 6.3.9. Thanks.
[8 Mar 2017 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".