The solution can be found here: https://bugs.mysql.com/bug.php?id=102532. Not sure if the MySQL devs intend to reopen this bug report, so you'll want to probably fix this yourself.
Specifically, I finally tracked the problem down to this line in db_generic_migration_grt.py
. My stack trace is below:
Traceback:
File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\db_postgresql_migration_grt.py", line 313, in migrateCatalog
return instance.migrateCatalog(state, source_catalog)
File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\db_generic_migration_grt.py", line 182, in migrateCatalog
targetSchema = self.migrateSchema(state, sourceSchema, target_catalog)
File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\db_generic_migration_grt.py", line 218, in migrateSchema
self.migrateSchemaContents(state, targetSchema, sourceSchema)
File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\db_generic_migration_grt.py", line 234, in migrateSchemaContents
target_table = self.migrateTableToMySQL(state, source_table, targetSchema)
File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\db_sql92_migration_grt.py", line 36, in migrateTableToMySQL
targetTable = super(Sql92Migration, self).migrateTableToMySQL(state, sourceTable, targetSchema)
File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\db_generic_migration_grt.py", line 285, in migrateTableToMySQL
targetIndex = self.migrateTableIndexToMySQL(state, sourceIndex, targetTable)
File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\db_generic_migration_grt.py", line 424, in migrateTableIndexToMySQL
prefix_length_limit = min(referenced_index_col.length, MYSQL_MAX_INDEX_KEY_LENGTH_INNODB_UTF8) if referenced_index_col.length > 0 else MYSQL_MAX_INDEX_KEY_LENGTH_INNODB_UTF8
NameError: '>' not supported between instances of 'NoneType' and 'int'
00:43:23 [ERR][ Wizard]: Thread 'Migrate Selected Objects' failed: TypeError("'>' not supported between instances of 'NoneType' and 'int'"): error calling Python module function DbPostgresqlMigration.migrateCatalog
All of the offending columns have had the text
type and were primary keys. I believe this is related to this StackOverflow discussion: MySQL error: key specification without a key length.
I fixed the problem by catching the errors in the Python file above and assigning MYSQL_MAX_INDEX_KEY_LENGTH_INNODB_UTF8
as the prefix_length_limit
in those cases. Not pretty, but it worked so I could migrate the data over.