Data type mapping from MySQL to YugabyteDB
The following table includes a list of supported data type mappings for migrating data from MySQL to YugabyteDB using YugabyteDB Voyager:
MySQL data type | Maps to YugabyeDB as | Description |
---|---|---|
BINARY | BYTEA | |
VARBINARY | BYTEA | |
BIT | BIT | |
BOOLEAN | SMALLINT | |
CHAR | CHAR | |
VARCHAR | VARCHAR | |
TINYTEXT | TEXT | |
MEDIUMTEXT | TEXT | |
TEXT | TEXT | |
LONGTEXT | TEXT | |
TINYBLOB | BYTEA | Data is ignored during export. |
BLOB | BYTEA | Data is ignored during export. |
MEDIUMBLOB | BYTEA | Data is ignored during export. |
LONGBLOB | BYTEA | Data is ignored during export. |
DATE | TIMESTAMP | |
TIME | TIME WITHOUT TIMEZONE | |
DATETIME | TIMESTAMP WITHOUT TIMEZONE | |
TIMESTAMP | TIMESTAMP | |
YEAR | SMALLINT | |
DEC | DECIMAL | |
DECIMAL | DECIMAL | |
NUMERIC | DECIMAL | |
FIXED | DECIMAL | |
ENUM | ENUM | A user-defined ENUM type is created |
FLOAT | DOUBLE PRECISION | |
REAL | DOUBLE PRECISION | |
DOUBLE | DOUBLE PRECISION | |
JSON/JSONB | JSON | |
UUID | BYTEA | Not a separate datatype; it is created using functions. |
TINYINT SIGNED | SMALLINT | |
TINYINT UNSIGNED | SMALLINT | |
SMALLINT SIGNED | INTEGER | |
SMALLINT UNSIGNED | INTEGER | |
MEDUIMINT SIGNED | INTEGER | |
MEDUIMINT UNSIGNED | INTEGER | |
INT/INTEGER SIGNED | BIGINT | |
INT/INTEGER UNSIGNED | BIGINT | |
BIGINT SIGNED | BIGINT | |
BIGINT UNSIGNED | NUMERIC(20) |