The world's most popular open source database
The menu option for altering a schema, Forward Engineer SQL ALTER Script ..., is used for updating a database that has been redesigned within MySQL Workbench. Typically, this option is used when the SQL script of a database has been imported into MySQL Workbench and changed. For instructions on importing a DDL script see Section 16.1, “Reverse Engineering Using a Create Script”.
Select File, Export, Forward Engineer SQL ALTER Script to start the Foward Engineer an ALTER Script wizard. You will be presented with the first page:
This first screen allows you to select a SQL script and compare it with the model currently in MySQL Workbench. The difference between the two models will be used to create an alter script that can be used to modify the target schema so that it matches the model held in MySQL Workbench. You can also simply view the script generated, rather than saving it to a file, by leaving the Output File text box empty.
Pressing Next brings you to the Review SQL Script screen.
Here you can review and change the alter script that will be
generated. Make any changes you wish and, if you are happy with
the changes, save the ALTER script to file
using the Save to File ... button. You
can also click the Execute button to
write the script to the previously specified output file.
The generated script can then be used to update the database.

