Table of contents
- Available DataTypes
- CODE USED TO GET TYPES
- BOOLEAN
MySQLDatabase
: BIT(1)SQLiteDatabase
: BOOLEANH2Database
: BOOLEANPostgresDatabase
: BOOLEANUnsupportedDatabase
: BOOLEANDB2Database
: SMALLINTMSSQLDatabase
: bitOracleDatabase
: NUMBER(1)HsqlDatabase
: BOOLEANFirebirdDatabase
: SMALLINTDerbyDatabase
: SMALLINTInformixDatabase
: BOOLEANSybaseDatabase
: BITSybaseASADatabase
: BIT
- TINYINT
MySQLDatabase
: TINYINTSQLiteDatabase
: TINYINTH2Database
: TINYINTPostgresDatabase
: SMALLINTUnsupportedDatabase
: TINYINTDB2Database
: SMALLINTMSSQLDatabase
: tinyintOracleDatabase
: NUMBER(3)HsqlDatabase
: TINYINTFirebirdDatabase
: SMALLINTDerbyDatabase
: SMALLINTInformixDatabase
: TINYINTSybaseDatabase
: TINYINTSybaseASADatabase
: TINYINT
- INT
- MEDIUMINT
MySQLDatabase
: MEDIUMINTSQLiteDatabase
: MEDIUMINTH2Database
: MEDIUMINTPostgresDatabase
: MEDIUMINTUnsupportedDatabase
: MEDIUMINTDB2Database
: MEDIUMINTMSSQLDatabase
: intOracleDatabase
: MEDIUMINTHsqlDatabase
: MEDIUMINTFirebirdDatabase
: MEDIUMINTDerbyDatabase
: MEDIUMINTInformixDatabase
: MEDIUMINTSybaseDatabase
: MEDIUMINTSybaseASADatabase
: MEDIUMINT
- BIGINT
MySQLDatabase
: BIGINTSQLiteDatabase
: BIGINTH2Database
: BIGINTPostgresDatabase
: BIGINTUnsupportedDatabase
: BIGINTDB2Database
: BIGINTMSSQLDatabase
: bigintOracleDatabase
: NUMBER(38, 0)HsqlDatabase
: BIGINTFirebirdDatabase
: BIGINTDerbyDatabase
: BIGINTInformixDatabase
: INT8SybaseDatabase
: BIGINTSybaseASADatabase
: BIGINT
- FLOAT
MySQLDatabase
: FLOATSQLiteDatabase
: FLOATH2Database
: FLOATPostgresDatabase
: FLOATUnsupportedDatabase
: FLOATDB2Database
: FLOATMSSQLDatabase
: FLOAT(53)OracleDatabase
: FLOATHsqlDatabase
: FLOATFirebirdDatabase
: FLOATDerbyDatabase
: FLOATInformixDatabase
: FLOATSybaseDatabase
: FLOATSybaseASADatabase
: FLOAT
- DOUBLE
MySQLDatabase
: DOUBLESQLiteDatabase
: DOUBLEH2Database
: DOUBLEPostgresDatabase
: DOUBLE PRECISIONUnsupportedDatabase
: DOUBLEDB2Database
: DOUBLEMSSQLDatabase
: FLOAT(53)OracleDatabase
: FLOAT(24)HsqlDatabase
: DOUBLEFirebirdDatabase
: DOUBLE PRECISIONDerbyDatabase
: DOUBLEInformixDatabase
: DOUBLE PRECISIONSybaseDatabase
: DOUBLESybaseASADatabase
: DOUBLE
- DECIMAL
MySQLDatabase
: DECIMALSQLiteDatabase
: DECIMALH2Database
: DECIMALPostgresDatabase
: DECIMALUnsupportedDatabase
: DECIMALDB2Database
: DECIMALMSSQLDatabase
: DECIMAL(18, 0)OracleDatabase
: DECIMALHsqlDatabase
: DECIMALFirebirdDatabase
: DECIMALDerbyDatabase
: DECIMALInformixDatabase
: DECIMALSybaseDatabase
: DECIMALSybaseASADatabase
: DECIMAL
- NUMBER
MySQLDatabase
: numericSQLiteDatabase
: NUMBERH2Database
: NUMBERPostgresDatabase
: numericUnsupportedDatabase
: NUMBERDB2Database
: numericMSSQLDatabase
: numeric(18, 0)OracleDatabase
: NUMBERHsqlDatabase
: numericFirebirdDatabase
: numericDerbyDatabase
: numericInformixDatabase
: numericSybaseDatabase
: numericSybaseASADatabase
: numeric
- BLOB
MySQLDatabase
: LONGBLOBSQLiteDatabase
: BLOBH2Database
: BLOBPostgresDatabase
: BYTEAUnsupportedDatabase
: BLOBDB2Database
: BLOBMSSQLDatabase
: varbinary(MAX)OracleDatabase
: BLOBHsqlDatabase
: BLOBFirebirdDatabase
: BLOBDerbyDatabase
: BLOBInformixDatabase
: BLOBSybaseDatabase
: IMAGESybaseASADatabase
: LONG BINARY
- FUNCTION
MySQLDatabase
: FUNCTIONSQLiteDatabase
: FUNCTIONH2Database
: FUNCTIONPostgresDatabase
: FUNCTIONUnsupportedDatabase
: FUNCTIONDB2Database
: FUNCTIONMSSQLDatabase
: functionOracleDatabase
: FUNCTIONHsqlDatabase
: FUNCTIONFirebirdDatabase
: FUNCTIONDerbyDatabase
: FUNCTIONInformixDatabase
: FUNCTIONSybaseDatabase
: FUNCTIONSybaseASADatabase
: FUNCTION
- UNKNOWN
MySQLDatabase
: UNKNOWNSQLiteDatabase
: UNKNOWNH2Database
: UNKNOWNPostgresDatabase
: UNKNOWNUnsupportedDatabase
: UNKNOWNDB2Database
: UNKNOWNMSSQLDatabase
: UNKNOWNOracleDatabase
: UNKNOWNHsqlDatabase
: UNKNOWNFirebirdDatabase
: UNKNOWNDerbyDatabase
: UNKNOWNInformixDatabase
: UNKNOWNSybaseDatabase
: UNKNOWNSybaseASADatabase
: UNKNOWN
- DATETIME
MySQLDatabase
: datetimeSQLiteDatabase
: TEXTH2Database
: TIMESTAMPPostgresDatabase
: TIMESTAMP WITHOUT TIME ZONEUnsupportedDatabase
: datetimeDB2Database
: TIMESTAMPMSSQLDatabase
: datetimeOracleDatabase
: TIMESTAMPHsqlDatabase
: TIMESTAMPFirebirdDatabase
: TIMESTAMPDerbyDatabase
: TIMESTAMPInformixDatabase
: DATETIME YEAR TO FRACTION(5)SybaseDatabase
: datetimeSybaseASADatabase
: datetime
- TIME
MySQLDatabase
: timeSQLiteDatabase
: timeH2Database
: timePostgresDatabase
: TIME WITHOUT TIME ZONEUnsupportedDatabase
: timeDB2Database
: timeMSSQLDatabase
: time(7)OracleDatabase
: DATEHsqlDatabase
: timeFirebirdDatabase
: timeDerbyDatabase
: timeInformixDatabase
: INTERVAL HOUR TO FRACTION(5)SybaseDatabase
: timeSybaseASADatabase
: time
- TIMESTAMP
MySQLDatabase
: timestampSQLiteDatabase
: TEXTH2Database
: TIMESTAMPPostgresDatabase
: TIMESTAMP WITHOUT TIME ZONEUnsupportedDatabase
: timestampDB2Database
: timestampMSSQLDatabase
: datetimeOracleDatabase
: TIMESTAMPHsqlDatabase
: TIMESTAMPFirebirdDatabase
: TIMESTAMPDerbyDatabase
: TIMESTAMPInformixDatabase
: DATETIME YEAR TO FRACTION(5)SybaseDatabase
: datetimeSybaseASADatabase
: timestamp
- DATE
- CHAR
- VARCHAR
MySQLDatabase
: VARCHARSQLiteDatabase
: VARCHARH2Database
: VARCHARPostgresDatabase
: VARCHARUnsupportedDatabase
: VARCHARDB2Database
: VARCHARMSSQLDatabase
: varchar(1)OracleDatabase
: VARCHAR2HsqlDatabase
: VARCHARFirebirdDatabase
: VARCHARDerbyDatabase
: VARCHARInformixDatabase
: VARCHARSybaseDatabase
: VARCHARSybaseASADatabase
: VARCHAR
- NCHAR
MySQLDatabase
: NCHARSQLiteDatabase
: NCHARH2Database
: NCHARPostgresDatabase
: NCHARUnsupportedDatabase
: NCHARDB2Database
: NCHARMSSQLDatabase
: nchar(1)OracleDatabase
: NCHARHsqlDatabase
: CHARFirebirdDatabase
: NCHARDerbyDatabase
: NCHARInformixDatabase
: NCHARSybaseDatabase
: NCHARSybaseASADatabase
: NCHAR
- NVARCHAR
MySQLDatabase
: NVARCHARSQLiteDatabase
: NVARCHARH2Database
: NVARCHARPostgresDatabase
: VARCHARUnsupportedDatabase
: NVARCHARDB2Database
: NVARCHARMSSQLDatabase
: nvarchar(1)OracleDatabase
: NVARCHAR2HsqlDatabase
: VARCHARFirebirdDatabase
: NVARCHARDerbyDatabase
: VARCHARInformixDatabase
: NVARCHARSybaseDatabase
: NVARCHARSybaseASADatabase
: NVARCHAR
- CLOB
MySQLDatabase
: LONGTEXTSQLiteDatabase
: TEXTH2Database
: CLOBPostgresDatabase
: TEXTUnsupportedDatabase
: CLOBDB2Database
: CLOBMSSQLDatabase
: varchar(MAX)OracleDatabase
: CLOBHsqlDatabase
: CLOBFirebirdDatabase
: BLOB SUB_TYPE TEXTDerbyDatabase
: CLOBInformixDatabase
: CLOBSybaseDatabase
: TEXTSybaseASADatabase
: LONG VARCHAR
- CURRENCY
MySQLDatabase
: DECIMALSQLiteDatabase
: REALH2Database
: DECIMALPostgresDatabase
: DECIMALUnsupportedDatabase
: DECIMALDB2Database
: DECIMAL(19, 4)MSSQLDatabase
: moneyOracleDatabase
: NUMBER(15, 2)HsqlDatabase
: DECIMALFirebirdDatabase
: DECIMAL(18, 4)DerbyDatabase
: DECIMALInformixDatabase
: MONEYSybaseDatabase
: MONEYSybaseASADatabase
: MONEY
- UUID
MySQLDatabase
: char(36)SQLiteDatabase
: TEXTH2Database
: UUIDPostgresDatabase
: UUIDUnsupportedDatabase
: char(36)DB2Database
: char(36)MSSQLDatabase
: uniqueidentifierOracleDatabase
: RAW(16)HsqlDatabase
: char(36)FirebirdDatabase
: char(36)DerbyDatabase
: char(36)InformixDatabase
: char(36)SybaseDatabase
: UNIQUEIDENTIFIERSybaseASADatabase
: UNIQUEIDENTIFIER
Available DataTypes
CODE USED TO GET TYPES
@Grab('org.liquibase:liquibase-core:3.5.1')
import liquibase.database.core.*
import liquibase.datatype.core.*
def
datatypes = BooleanType, TinyIntType, IntType, MediumIntType, BigIntType, FloatType, DoubleType, DecimalType, NumberType, BlobType, DatabaseFunctionType, UnknownType, DateTimeType, TimeType, TimestampType, DateType, CharType, VarcharType, NCharType, NVarcharType, ClobType, CurrencyType, UUIDType
def
databases = MySQLDatabase, SQLiteDatabase, H2Database, PostgresDatabase, UnsupportedDatabase, DB2Database, MSSQLDatabase, OracleDatabase, HsqlDatabase, FirebirdDatabase, DerbyDatabase, InformixDatabase, SybaseDatabase, SybaseASADatabase
datatypes.each {
def datatype = it.newInstance()
datatype.finishInitialization("")
println datatype.name
databases.each { println "$it.simpleName: ${datatype.toDatabaseDataType(it.newInstance())}" }
println ''
}