Liquibase DataType and Oracle Support

Description

Changelog Type Int Support.
https://github.com/liquibase/liquibase/blob/master/liquibase-core/src/main/java/liquibase/datatype/core/IntType.java

As of now, INT gets translated into INTEGER as a column type. Oracle treats INTEGER as NUMBER(38,0) which is the maximum size. It would be great if it gets treated as NUMBER(10,0). Your 4.0.x version seems to have the fixed placed in, but doesn't seem to have a release window of anytime soon. Also, there's an Oracle documentation that would suggest treating MySQL INT and INTEGER as NUMBER(10,0). References will be linked below.

https://github.com/liquibase/liquibase/blob/4.0.x/liquibase-core/src/main/java/liquibase/datatype/core/IntType.java
https://docs.oracle.com/cd/E12151_01/doc.150/e12155/oracle_mysql_compared.htm#i1027526

Now in the same oracle documentation, it suggested that mediumint gets converted as NUMBER(7,0). Currently in the code in master, it returns MEDIUMINT as a column type. This is a bug because there's no such thing as medium int type in Oracle and will fail the sql statement. Also, someone made a comment about it always returning a smallint. I believe that's a typo.

https://github.com/liquibase/liquibase/blob/master/liquibase-core/src/main/java/liquibase/datatype/core/MediumIntType.java

Environment

Changelog against an Oracle Database Version 12.1.0.2

Activity

Show:

Details

Reporter

Components

Fix versions

Affects versions

Priority

Created July 31, 2018 at 12:14 AM
Updated July 31, 2018 at 12:14 AM