Bug #83728 SQL Script Creator - Create foreign keys after creating tables
Submitted: 7 Nov 2016 17:20 Modified: 5 Feb 2018 10:29
Reporter: Manuel Himmler Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S4 (Feature request)
Version:6.3.8, 6.3.10 OS:Windows (Microsoft Windows 10 Enterprise)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[7 Nov 2016 17:20] Manuel Himmler
Description:
It would be very helpful if it is possible to select whether in Forward Engineer SQL Script the creator creates the fks within the tables or only after creating all tables first.

Because if I have two tables and in each table I have a foreign key to the other one, I have a problem with the created script.

How to repeat:
Create two tables with foreign keys in the other one.
[5 Feb 2018 10:29] MySQL Verification Team
Hello Manuel Himmler,

Thank you for the report.
In both the forward engineer functionalities i.e Forward Engineering Using an SQL Script(File-Export->Forward engineer SQL Create Script i.e Ctr+Shift+G) and in Forward Engineering to a Live Server(Database -> Forward engineer i.e Ctr+G option in Modeling interface) there is "Skip creation of FOREIGN KEYS" and "Disable FK checks for inserts" options available but no such create FKs later option. 

Workaround at the moment(for tables a<->b) is to use option "Skip creation of FOREIGN KEYS" during forward engineer, and later altering each tables with skip fk checks.

Thanks,
Umesh