Bug #117946 Error migrating PostgreSQL 16.8 to MySQL 8.0.41 using Wokbench Migration Tool
Submitted: 11 Apr 11:13 Modified: 6 May 14:54
Reporter: venkateswara rao motupalli Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench: Migration Severity:S2 (Serious)
Version:MySQL Workbench 8.0.41 OS:Windows
Assigned to: CPU Architecture:x86

[11 Apr 11:13] venkateswara rao motupalli
Description:
Hi I'm facing an error while trying to convert a PostgreSQL Database (Catalogue with 13 tables) into MySQL DB.

Source : PostgreSQL 16.8 on x86_64-pc-linux-gnu
Target : 8.0.41 MySQL Community Server - GPL

Error as below. Can someone let know what is the exact fix for this pls ?
I have seen multiple MySQL Bugs based blogs (from 2021 & 2022 even), nowhere there is a solution to this over last couple of years.

Request an update as the Current Production has a very high risk on a legacy hardware system.

Traceback (most recent call last):
  File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\workbench\wizard_progress_page_widget.py", line 198, in thread_work
    self.func()
  File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\migration_object_migration.py", line 118, in task_migrate
    self.main.plan.migrate()
  File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\migration.py", line 511, in migrate
    self.migrationTarget.catalog = self.migrationSource.migration.migrateCatalog(self.state, self.migrationSource.catalog)
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: TypeError("'<=' not supported between instances of 'int' and 'NoneType'"): error calling Python module function DbPostgresqlMigration.migrateCatalog
ERROR: Migrate Selected Objects: TypeError("'<=' not supported between instances of 'int' and 'NoneType'"): error calling Python module function DbPostgresqlMigration.migrateCatalog
Failed

How to repeat:
Start Migration Wizard.  Input source rdbms PostgreSQL 16.8 - remote Server using ODBC.  Continue.  Input target rdbms - local MySQL using TCP/IP. Continue. Fetch Schemas List. Continue. Schemas Selection . Continue. Reverse Engineer Source. Continue. Object Migration [Source Objects] -> Select all . Continue. Migration (this is where issue occurs as below)

A task has failed executing..

ERROR: Migrate Selected Objects: TypeError("'<=' not supported between instances of 'int' and 'NoneType'"): error calling Python module function DbPostgresqlMigration.migrateCatalog
Failed
[15 Apr 15:22] venkateswara rao motupalli
Hi Any update to this Bug ?

It has been hampering my further steps in migration to MySQL DB.
[16 Apr 11:20] MySQL Verification Team
Hello Venkateswara Rao,

Thank you for the bug report.
Imho this is duplicate of Bug #93594, please see Bug #93594.

Regards,
Ashwini Patil
[17 Apr 11:05] venkateswara rao motupalli
Hi Ashwani,

No, it is not a duplicate bug. If you may kindly refer to the error logs, it is a different one that is seen.

The "min_value" error being referred in Bug #93594 was in the earlier steps <Reverse engineering step> in the Migration wizard. That change in db_postgresql_re_grt.py was maded to move forward, after which this new issue as below is hit. (in the Traceback logs added already)
 
{"'<=' not supported between instances of 'int' and 'NoneType'" }

In another Bug raised - Bug #104762 by a user, even there it was mentioned about the same issue in Aug 2021. Still it is open with no Fix or workaround to it. There even the User has come back and mentioned that it is not associated or related to Bug #93594.

I'm hit with the exact same error and it is not proceeding any further in the migration steps. Request your Bug fix/solution in this regard as a Critical Production on our customer's ecosystem is awaiting this solution to be migrated from PgSQL -> MySQL due to their latest application support limitations.

With the above reasons & details, I want this Bug re-opened and not marked as Duplicate.
[17 Apr 12:33] MySQL Verification Team
please provide PostgreSQL Database to reproduce this issue at our end. Thanks.
[22 Apr 14:56] venkateswara rao motupalli
Hi Team,

Source DB : PostgreSQL 16.8 on x86_64-pc-linux-gnu
Target DB : 8.0.41 MySQL Community Server - GPL

Tool version : MySQL Workbench 8.0.41

I have added most of this information in the first update above. Nevertheless, do kindly let know if any other information is needed further.
[22 Apr 18:34] venkateswara rao motupalli
As an added update, I have tried the DB Migration with the recently released MySQL Workbench 8.0.42 build 5076204 CE to observe if any Bugfixes are covered in this.

Even in this latest MySQL Workbench 8.0.42 - the same error is seen.

Starting...
Migrate Selected Objects....
- Migrating...
- Migrating schema django...
- Migrating schema contents for schema django
- Table django.auth_group migrated
- Table django.auth_group_permissions migrated
- Table django.auth_permission migrated
- Table django.auth_user migrated
- Table django.auth_user_groups migrated
- Table django.auth_user_user_permissions migrated
- Table django.django_admin_log migrated
- Table django.django_content_type migrated
- Table django.django_migrations migrated
- Table django.django_session migrated

Traceback (most recent call last):
  File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\workbench\wizard_progress_page_widget.py", line 198, in thread_work
    self.func()
  File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\migration_object_migration.py", line 118, in task_migrate
    self.main.plan.migrate()
  File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\migration.py", line 511, in migrate
    self.migrationTarget.catalog = self.migrationSource.migration.migrateCatalog(self.state, self.migrationSource.catalog)
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: TypeError("'<=' not supported between instances of 'int' and 'NoneType'"): error calling Python module function DbPostgresqlMigration.migrateCatalog
ERROR: Migrate Selected Objects: TypeError("'<=' not supported between instances of 'int' and 'NoneType'"): error calling Python module function DbPostgresqlMigration.migrateCatalog
Failed
[22 Apr 18:35] venkateswara rao motupalli
Error Screenshot

Attachment: PgSQL_MySQL_Migration_Traceback.JPG (image/jpeg, text), 208.86 KiB.

[25 Apr 17:18] venkateswara rao motupalli
Attaching Workbench log when this exact error is hit.

Attachment: wb.log (application/octet-stream, text), 19.64 KiB.

[6 May 14:54] venkateswara rao motupalli
Hi Team,

Any update to this Thread ? The Prod setup is on hold, running still with legacy issues for a long time now.

Quick response is much appreciated.