Bug #81100 Workbench Migration Wizard fails for generated columns
Submitted: 15 Apr 2016 17:05 Modified: 13 Jun 2016 13:50
Reporter: Gerald Dueck Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Migration Severity:S3 (Non-critical)
Version:6.3.6 OS:Any
Assigned to: CPU Architecture:Any
Tags: Workbench 6.3.6

[15 Apr 2016 17:05] Gerald Dueck
Description:
When using the migration wizard to copy a database from source to target MySQL servers, copy file fails for tables that have generated columns because the target server rejects attempts to insert data into a generated column.

How to repeat:
Create a table containing a generated column - virtual or stored.
Migrate the schema containing the table.

Suggested fix:
This workaround worked for me in migrating a database from MySQL to MySQL
1) run a script on the source server to drop all generated columns and all views that depend on generated columns
2) migrate the database
3) run a script on the target server to recreate all generated columns and all views that depend on generated columns
A fix for the migration wizard may be simply to not include generated columns in the copytable algorithm and allow the target server to create the values upon insertion.
[15 Apr 2016 17:11] Gerald Dueck
After dropping generated columns, Refresh All
After performing migration, recreate generated columns and afferent views on the source schema as well as on the target.
[19 Apr 2016 8:20] MySQL Verification Team
Hello Gerald Dueck,

Thank you for the report.
Verified as described.

Thanks,
Umesh
[13 Jun 2016 13:50] Philip Olson
Posted by developer:
 
Fixed as of the upcoming MySQL Workbench 6.3.7 release, and here's the changelog entry:

Migrating a MySQL source to a MySQL target database would fail for tables
that had generated columns, as the target server rejected attempts to
insert data into generated columns.

Thank you for the bug report.