ChrisLundquist / pg2mysql

Some patches for http://www.lightbox.ca/pg2mysql.php
136 stars 55 forks source link

Column name strings get misinterpreted as column type strings #8

Open yongjunj opened 8 years ago

yongjunj commented 8 years ago

Thank you for your work on pg2mysql - it's been a godsend on a number of occasions.

This is a minor issue, but it seems that column name strings get misinterpreted as column type strings, producing an invalid SQL output. Creating an issue here just for reference.

Input:

...
CREATE TABLE test (
    integer1    text,
    integer2    text
);
...

Expected output:

CREATE TABLE test (
    integer1    text,
    integer2    text
) TYPE=MyISAM;

Actual output:

CREATE TABLE test (
    int(11)1    text,
    int(11)2    text
) TYPE=MyISAM;