Bug #48249 Invalid results for "Forward Engineer SQL Alter Script" feature
Submitted: 23 Oct 1:13 Modified: 28 Oct 22:39
Reporter: Jason Hendrix
Status: Verified
Category:MySQL Workbench Severity:S2 (Serious)
Version:5.1.18 SE OS:Microsoft Windows (Windows 7 (RTM))
Assigned to: Alexander Musienko Target Version:WB52
Tags: export, forward engineer

[23 Oct 1:13] Jason Hendrix
Description:
I have a database that has been "mysqldump"ed to a file.

I have a MySQL Workbench file that attempts to model that database but was created
separately.

When I open the model and attempt to create an alter script from the "mysqldump"ed file,
the alter script that is created contains no "alter" statements.  It only includes create
statements as if the dump file contains no reference to anything in the model (which it
does).

How to repeat:
1. Open the attached model file.
2. Go to File... Export... Forward Engineer SQL Alter Script...
3. Choose the attached .sql file as the "Input File".
4. Leave "Output File" empty.
5. Click "Next".
6. View the results... Only create statements are generated, no alter statements.
[2 Nov 19:38] Tobias Munk
I had the same issue with an SQL CREATE Script created by MySQL Workbench itself.

The ALTER Script process needs a dump with schema qualifiers for all objects/tables,
otherwise it tries to create the "missing" tables.

I think the ALTER Script process should show the same dialog as CREATE Script, where you
can choose to "Omit object qualifiers".
[24 Nov 10:32] Johannes Taxacher
the CREATE ALTER feature needs to get CREATE statements including the schema qualifiers as
input . thats by design. sorry for not mentioning that in our documentation (and to our
docs team as well).
we will add this information to the docs and also put a info label into the dlg.

we'll keep that report as feature request to include the functionality, to use scripts
without full schema qualifiers, at a later time