I'm trying to upgrade Liquibase from 2.0.5 to 3.2.2. Liquibase 3.2.2 has changed the boolean type implementation for MySQL from tinytint(1) to bit(1). This breaks a lot of our historical changesets, e.g. in places where we set the default like so: default="1" (which fails with error Data truncation: Data too long for column in MySQL 5.6.16).
Rather than rewrite/fix gobs of changeset history, I'm looking for an easier way to deal with it so we can upgrade. I'm not opposed to telling Liquibase to continue to use tinyint(1) for mysql. I see notes in the user forum on extending liquibase.database.typeconversion.core.MySQLTypeConverter to accomplish it, but that mechanism does not appear to be available in 3.2.2.
Any idea how I tell Liquibase 3.2.2 to continue to use tinyint(1)? Failing that, any other ideas on how deal with this without rewriting changeset history?
With 3.2.2, the TypeConverterLogic has moved to type-specific classes. So you can override liquibase.datatype.core.BooleanType and the toDatabaseDataType() method to return TINYINT(1) instead of BIT(1)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With