Gerhard Gruber 2020-06-02 13:30:17 +02:00 committed by GitHub
parent 4aeade3621
commit d892695c2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,7 +78,7 @@ func (s *mssql) DataTypeOf(field *StructField) string {
case reflect.Float32, reflect.Float64:
sqlType = "float"
case reflect.String:
if size > 0 && size < 8000 {
if size > 0 && size < 4000 {
sqlType = fmt.Sprintf("nvarchar(%d)", size)
} else {
sqlType = "nvarchar(max)"