diff --git a/model_struct.go b/model_struct.go index b7c44414..f73c902b 100644 --- a/model_struct.go +++ b/model_struct.go @@ -312,7 +312,7 @@ func (scope *Scope) generateSqlTag(field *StructField) string { additionalType := sqlSettings["NOT NULL"] + " " + sqlSettings["UNIQUE"] if value, ok := sqlSettings["DEFAULT"]; ok { - additionalType = additionalType + "DEFAULT " + value + additionalType = additionalType + " DEFAULT " + value } if field.IsScanner {