Liquibase
是一个开源的数据库版本控制工具,旨在简化和自动化数据库变更的管理和部署。它允许开发人员和数据库管理员以声明式的方式定义数据库架构和数据变更,然后自动将这些变更应用到各种数据库中。Liquibase
支持多种数据库类型,提供了良好的可移植性和可扩展性。
使用场景
CI/CD
管道中,Liquibase
可以自动应用数据库变更脚本,确保数据库在各个环境中的一致性。Liquibase
共享和协作管理数据库变更,避免冲突和重复工作。Liquibase
在不同数据库系统中支持多种数据类型。以下是一些常见的数据类型及其在不同数据库中的对应关系。
BIT(1)
BOOLEAN
BOOLEAN
BOOLEAN
BOOLEAN
SMALLINT
[bit]
NUMBER(1)
BOOLEAN
SMALLINT
SMALLINT
BOOLEAN
BIT
BIT
TINYINT
TINYINT
TINYINT
SMALLINT
TINYINT
SMALLINT
[tinyint]
NUMBER(3)
TINYINT
SMALLINT
SMALLINT
TINYINT
TINYINT
TINYINT
INT
INTEGER
INT
INT
INT
INTEGER
[int]
INTEGER
INT
INT
INTEGER
INT
INT
INT
MEDIUMINT
MEDIUMINT
MEDIUMINT
MEDIUMINT
MEDIUMINT
MEDIUMINT
[int]
MEDIUMINT
MEDIUMINT
MEDIUMINT
MEDIUMINT
MEDIUMINT
MEDIUMINT
MEDIUMINT
BIGINT
BIGINT
BIGINT
BIGINT
BIGINT
BIGINT
[bigint]
NUMBER(38, 0)
BIGINT
BIGINT
BIGINT
INT8
BIGINT
BIGINT
numeric
NUMBER
NUMBER
numeric
NUMBER
numeric
[numeric](18, 0)
NUMBER
numeric
numeric
numeric
numeric
numeric
numeric
FLOAT
FLOAT
FLOAT
FLOAT
FLOAT
FLOAT
[float](53)
FLOAT
FLOAT
FLOAT
FLOAT
FLOAT
FLOAT
FLOAT
DOUBLE
DOUBLE
DOUBLE
DOUBLE PRECISION
DOUBLE
DOUBLE
[float](53)
FLOAT(24)
DOUBLE
DOUBLE PRECISION
DOUBLE
DOUBLE PRECISION
DOUBLE
DOUBLE
DECIMAL
DECIMAL
DECIMAL
DECIMAL
DECIMAL
DECIMAL
[decimal](18, 0)
DECIMAL
DECIMAL
DECIMAL
DECIMAL
DECIMAL
DECIMAL
DECIMAL
DECIMAL
REAL
DECIMAL
DECIMAL
DECIMAL
DECIMAL(19, 4)
[money]
NUMBER(15, 2)
DECIMAL
DECIMAL(18, 4)
DECIMAL
MONEY
MONEY
MONEY
CHAR
CHAR
CHAR
CHAR
CHAR
CHAR
[char](1)
CHAR
CHAR
CHAR
CHAR
CHAR
CHAR
CHAR
VARCHAR
VARCHAR
VARCHAR
VARCHAR
VARCHAR
VARCHAR
[varchar](1)
VARCHAR2
VARCHAR
VARCHAR
VARCHAR
VARCHAR
VARCHAR
VARCHAR
NCHAR
NCHAR
NCHAR
NCHAR
NCHAR
NCHAR
[nchar](1)
NCHAR
CHAR
NCHAR
NCHAR
NCHAR
NCHAR
NCHAR
NVARCHAR
NVARCHAR
NVARCHAR
VARCHAR
NVARCHAR
NVARCHAR
[nvarchar](1)
NVARCHAR2
VARCHAR
NVARCHAR
VARCHAR
NVARCHAR
NVARCHAR
NVARCHAR
datetime
TEXT
TIMESTAMP
TIMESTAMP WITHOUT TIME ZONE
datetime
TIMESTAMP
[datetime]
TIMESTAMP
TIMESTAMP
TIMESTAMP
TIMESTAMP
DATETIME YEAR TO FRACTION(5)
datetime
datetime
time
time
time
TIME WITHOUT TIME ZONE
time
time
[time](7)
DATE
time
time
time
INTERVAL HOUR TO FRACTION(5)
time
time
timestamp
TEXT
TIMESTAMP
TIMESTAMP WITHOUT TIME ZONE
timestamp
timestamp
[datetime]
TIMESTAMP
TIMESTAMP
TIMESTAMP
TIMESTAMP
DATETIME YEAR TO FRACTION(5)
datetime
timestamp
date
date
date
date
date
date
[date]
date
date
date
date
date
date
date
LONGBLOB
BLOB
BLOB
BYTEA
BLOB
BLOB
[varbinary](MAX)
BLOB
BLOB
BLOB
BLOB
BLOB
IMAGE
LONG BINARY
LONGTEXT
TEXT
CLOB
TEXT
CLOB
CLOB
[varchar](MAX)
CLOB
CLOB
BLOB SUB_TYPE TEXT
CLOB
CLOB
TEXT
LONG VARCHAR
FUNCTION
FUNCTION
FUNCTION
FUNCTION
FUNCTION
FUNCTION
[function]
FUNCTION
FUNCTION
FUNCTION
FUNCTION
FUNCTION
FUNCTION
FUNCTION
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
[UNKNOWN]
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
char(36)
TEXT
UUID
UUID
char(36)
char(36)
[uniqueidentifier]
RAW(16)
char(36)
char(36)
char(36)
char(36)
UNIQUEIDENTIFIER
UNIQUEIDENTIFIER
本文作者:蒋固金
本文链接:
版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!