darold / ora2pg

Ora2Pg is a free tool used to migrate an Oracle database to a PostgreSQL compatible schema. It connects your Oracle database, scan it automatically and extracts its structure or data, it then generates SQL scripts that you can load into PostgreSQL.
http://www.ora2pg.com/
GNU General Public License v3.0
978 stars 341 forks source link

When migrating from MySQL 5.1 to PostgreSQL, an exception occurs #1655

Closed Code-UV closed 11 months ago

Code-UV commented 1 year ago

MySQL Version: 5.1 PostgreSQL Version: 14 ora2pg Version: 3.24.0 MySQL Table:

CREATE TABLE Untitled (
test_id bigint(20) ,
test_set set('1','2') ,
test_enum enum('1','3') ,
test_year year(4) ,
test_bit bit(64),
)

Error: Unknown column DTD_IDENTIFIER in field list The code that triggers this phenomenon is line 394 of MySQL. pm:

    if ($self->{db_version} < '5.5.0') {
        $str =~ s/\bDATA_TYPE\b/DTD_IDENTIFIER/;
    }

MySQL5.1 INFORMATION_SCHEMA.COLUMNS has DATA_TYPE.

darold commented 11 months ago

Fixed by commit 227c1a5. Thanks.