package liquibase.datatype.core;

import liquibase.database.Database;
import liquibase.database.core.MySQLDatabase;
import liquibase.datatype.DataTypeInfo;
import liquibase.datatype.DatabaseDataType;
import liquibase.datatype.LiquibaseDataType;

@DataTypeInfo(name = "timestamp", aliases = {"timestamp", "java.sql.Types.TIMESTAMP", "java.sql.Timestamp"}, minParameters = 0, maxParameters = 1, priority = LiquibaseDataType.PRIORITY_DEFAULT)
public class TimestampType extends DateTimeType {
    @Override
    public DatabaseDataType toDatabaseDataType(Database database) {
        if (database instanceof MySQLDatabase) {
            return new DatabaseDataType("TIMESTAMP");
        }
        return super.toDatabaseDataType(database);
    }
}

@@ -55,32 +55,78 @@
 abase.Database;%0A
+import liquibase.database.core.MSSQLDatabase;%0A
 import liquibase
@@ -724,16 +724,128 @@
       %7D%0A
+        if (database instanceof MSSQLDatabase) %7B%0A            return new DatabaseDataType(%22DATETIME%22);%0A        %7D%0A
         

CORE-1607 MSSQL java.sql.Types.TIMESTAMP should map to DateTime