How does Liquibase handle data types?
When you specify a data type in the type
field of a Change Type or tag, such as the <column type="XYZ">
field, Liquibase evaluates the type to send it to your database.
Liquibase implements many generic types natively. When necessary, Liquibase converts the data type you specify into a different type preferred by your database.
For example, if you specify the data type BOOLEAN
in your changelog, Liquibase passes it to a Snowflake database as a BOOLEAN
. However, on a PostgreSQL database, Liquibase converts it to a BIT
.
Type mapping matrix
The following table describes the logical mapping between data types in Liquibase:
Each column is a generic type.
Each row is a database supported by Liquibase.
Each cell represents the database type Liquibase converts the generic type in that column to.