Liquibase 3.6.x data types mapping table

data type mapping smallDesigning a database, you have to choose data types for columns. It is not neutral which one is used. When you use Liquibase, you use an additional abstraction layer as it has its own data types. They are mapped to data types proper to a specific database engine later during scripts execution process. Choosing a data type, you should keep in mind the final data type on your database engine.

Data types mapping in Liquibase 3.6.x

Liquibase data type SQL Server data type Oracle data type MySQL PostgreSQL
bigint bigint number(38,0) bigint bigint/bigserial
blob varbinary(max) blob blob oid
boolean bit number(1) bit bit
char char char char character
clob nvarchar(max) clob longtext text
currency money number(15,2) decimal decimal
datetime datetime timestamp timestamp timestamp
date date date date date
decimal decimal decimal decimal decimal 
double float float(24) double double precision
float float float float float
int int integer int integer/serial
mediumint int mediumint mediumint mediumint
nchar nchar nchar nchar nchar
nvarchar nvarchar nvarchar2 nvarchar varchar
number numeric number numeric numeric
smallint smallint number(5) smallint smallint/smallserial
time time date time time
timestamp datetime timestamp timestamp timestamp
tinyint tinyint number(3) tinyint smallint
uuid uniqueidentifier raw(16) char(36) uuid
varchar varchar varchar2  varchar varchar/character (varying)

For other Liquibase articles, please read:

Database versioning - theory [video]

Database versioning part 2 - Liquibase - how to use [video]

 

Do not miss valuable content. You will receive a monthly summary email. You can unsubscribe anytime.

If you like what I do, consider buying me a coffee :)

Buy me a coffeeBuy me a coffee