Bug #37174 Global schema comments not "exported" in Workbench among others
Submitted: 3 Jun 2008 23:17 Modified: 14 Jan 2014 3:01
Reporter: Phil Nickerson Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S4 (Feature request)
Version:5.0.22 OS:Windows
Assigned to: CPU Architecture:Any
Tags: comment, document, global, MySQL Workbench

[3 Jun 2008 23:17] Phil Nickerson
Description:
When using the "Forward Engineer SQL CREATE Script..." from File->Export, no "global" comments are transferred to the generated .sql file.  The candidate information can be extracted from the "Description" from File->Document Properties.  This information should be generated as the first item in the .sql file (this is where, for example, the cvs $Id$ tag can go in my case."

Additionally, the "Comments" from the Physical Schemata->(schema tab, starts as mydb) where you specify the Name and Collation should be further placed as a COMMENT in the generated "CREATE SCHEMA" directive in the .sql file.

The comments from the Indexes tab on a table should also be transferred  to the .sql file with the index creation.

How to repeat:
Add documentation to the aforementioned locations:
1) "File->Document Properties..."->Description
2) MySQL Model->(your database)[double click] go to lower tab representing your database and enter documentaiton into the "Comments" field (below the Name and Collation fields).
3) From the EER diagram, right click on a relationship (such as an identifying 1:n) and elect "Edit Relationship..." and enter documentation into the "Comments" field.

Save your project and select "File->Export->Forward Engineer SQL CREATE Script..." and save somewhere.  Open in EMACS (ok, so probably "vi") and look at the .sql file to see that none of this documentation has been transferred to the .sql file.

If you add comments to the tables and columns, you'll see that the documentation from these components are indeed transferred to the .sql file.  The transfer of documentation is inconsistent.

Suggested fix:
Use "--" to transfer the "global" documentation to the file and the SQL COMMENT for the other documentation.
[4 Jun 2008 17:46] MySQL Verification Team
Thank you for the bug report.
[25 Jun 2010 12:34] Mike Lischke
Still needs to be implemented.
[14 Jan 2014 3:01] Philip Olson
Fixed as of the upcoming MySQL Workbench 6.1.1 release, and here is the changelog entry:

Comments added with the "File", "Export", "Forward Engineer SQL CREATE
Script..." action would not be transferred to the generated SQL file.

Thank you for the bug report.