Skip to content

Commit

Permalink
Fixes #19720 single parenthesis defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
mikes-gh authored Feb 7, 2020
1 parent ac341b0 commit 584245c
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ UNION ALL
return defaultValue;
}

if (defaultValue == "((0))")
if (defaultValue == "((0))" || defaultValue == "(0)")
{
if (dataTypeName == "bigint"
|| dataTypeName == "bit"
Expand All @@ -716,7 +716,7 @@ UNION ALL
return null;
}
}
else if (defaultValue == "((0.0))")
else if (defaultValue == "((0.0))" || defaultValue == "(0.0)")
{
if (dataTypeName == "decimal"
|| dataTypeName == "float"
Expand All @@ -730,6 +730,7 @@ UNION ALL
}
else if ((defaultValue == "(CONVERT([real],(0)))" && dataTypeName == "real")
|| (defaultValue == "((0.0000000000000000e+000))" && dataTypeName == "float")
|| (defaultValue == "(0.0000000000000000e+000)" && dataTypeName == "float")
|| (defaultValue == "('0001-01-01')" && dataTypeName == "date")
|| (defaultValue == "('1900-01-01T00:00:00.000')" && (dataTypeName == "datetime" || dataTypeName == "smalldatetime"))
|| (defaultValue == "('0001-01-01T00:00:00.000')" && dataTypeName == "datetime2")
Expand Down

0 comments on commit 584245c

Please sign in to comment.