AnatolyUss / nmig

NMIG is a database migration tool, written in Node.js and highly inspired by FromMySqlToPostgreSql.
GNU General Public License v3.0
451 stars 83 forks source link

Data migration from mysql to postgres is not converting the datatype smallint(mysql) to Boolean(postgres) #135

Open hero78 opened 1 month ago

hero78 commented 1 month ago

While migrating from mysql Database to Postgres. The Data type smallint which is meant to capture values like 1,0 (True/false respectively) is failing to be coverted to BOOLEAN. In Postgres it's maintained as Smallint

manakov-dev commented 1 month ago

In my case it was tinyint and adding

    "tinyint" : {
        "increased_size"           : "boolean",
        "type"                     : "boolean",
        "mySqlVarLenPgSqlFixedLen" : true
    },

to the data_types_map.json helped. But check that you use Smallint only for boolean values before this hack.

hero78 commented 2 weeks ago

Thanks @manakov-dev . This helped. We can close this Ticket