tinyint(1) in MySQL
When copying a MySQL schema, TINYINT(1)
fields in the source database can sometimes be transformed into BIT(1)
in the target database.
To prevent TINYINT(1)
from being converted to BIT(1)
, set the tinyInt1isBit
JDBC parameter to false
in the connection URL for the source database. For example:
jdbc:mysql://127.0.0.1:6000/sakila?tinyInt1isBit=false
Here’s a full example of the command for starting TDK transformation:
tdk \
--input-url jdbc:mysql://127.0.0.1:6000/sakila?tinyInt1isBit=false \
--input-username root --input-password admin \
--output-url jdbc:mysql://127.0.0.1:6001/ \
--output-username root --output-password admin \
--config-file config.tdk.yaml
More detailed information about tinyInt1isBit
parameter is available in the documentation. Additional information about MySQL type conversions here.