Skip to content

Commit

Permalink
Fix for varchar(max)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasjordan committed Jun 22, 2023
1 parent 9a49a6f commit 7f2fa08
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions private/functions/Convert-DbaIndexToTable.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ function Convert-DbaIndexToTable {
{ $_ -in "bigint", "date", "datetime", "datetime2", "smallint", "time", "tinyint" } {
$columnStatements += "[$($columnObject.Name)] [$dataType]"
}
{ $_ -like "*varcharmax" } {
$columnStatements += "[$($columnObject.Name)] [$($dataType.Replace('max',''))](max)"
break
}
{ $_ -like "*char*" } {
$columnStatements += "[$($columnObject.Name)] [$dataType]($length)"
}
Expand Down

0 comments on commit 7f2fa08

Please sign in to comment.