Why DateType in SQL Server 2008 is converted as SMALLDATETIME?

Hello


I had an issue when generating a statement in SQL Server 2008 database with DateType class, it is generating SMALLDATETIME instead of DATETIME.


I checked the code (liquibase 3.1.1) and we have that explicity condition in liquibase.datatype.core.DateType class:


@Override

    public DatabaseDataType toDatabaseDataType(Database database) {

        if (database instanceof MSSQLDatabase) {

            try {

                if (database.getDatabaseMajorVersion() <= 9) { //2005 or earlier

                    return new DatabaseDataType(“SMALLDATETIME”);

                }

            } catch (DatabaseException ignore) { } //assuming it is a newer version


        }

        return new DatabaseDataType(getName());

    }


Why? 


NOTE: I already solved my issue by extending DateType class with a higher priority.


Thank you in advance!

This should be fixed in the upcoming 3.2 release. Good you have a workaround for now.


Nathan