Skip to content

Commit

Permalink
0003768: On SQL Server 2016 all datetime2 columns are altered on every
Browse files Browse the repository at this point in the history
restart
  • Loading branch information
chenson42 committed Oct 25, 2018
1 parent 4c722c8 commit de66bae
Showing 1 changed file with 5 additions and 3 deletions.
Expand Up @@ -165,7 +165,7 @@ protected Integer mapUnknownJdbcTypeForColumn(Map<String, Object> values) {
if (isNotBlank(columnSize)) {
size = Integer.parseInt(columnSize);
}
if (typeName != null) {
if (typeName != null) {
if (typeName.toLowerCase().startsWith("text")) {
return Types.LONGVARCHAR;
} else if ( typeName.toLowerCase().startsWith("ntext")) {
Expand All @@ -182,9 +182,11 @@ protected Integer mapUnknownJdbcTypeForColumn(Map<String, Object> values) {
return Types.LONGNVARCHAR;
} else if ( typeName.toUpperCase().equals("SQL_VARIANT")) {
return Types.BINARY;
} else if (typeName != null && typeName.equalsIgnoreCase("DATETIMEOFFSET")) {
} else if (typeName.equalsIgnoreCase("DATETIMEOFFSET")) {
return MAPPED_TIMESTAMPTZ;
}
} else if (typeName.equalsIgnoreCase("datetime2")) {
return Types.TIMESTAMP;
}
}
return super.mapUnknownJdbcTypeForColumn(values);
}
Expand Down

0 comments on commit de66bae

Please sign in to comment.