From 1e28551d25f09dafecd7f6561f6bfa6651352085 Mon Sep 17 00:00:00 2001 From: Jinzhu Date: Fri, 20 Mar 2015 17:21:13 +0800 Subject: [PATCH] Fix additional SQL type --- model_struct.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {