forked from mirror/gorm
Fix additional SQL type
This commit is contained in:
parent
4b98b145b1
commit
1e28551d25
|
@ -312,7 +312,7 @@ func (scope *Scope) generateSqlTag(field *StructField) string {
|
||||||
|
|
||||||
additionalType := sqlSettings["NOT NULL"] + " " + sqlSettings["UNIQUE"]
|
additionalType := sqlSettings["NOT NULL"] + " " + sqlSettings["UNIQUE"]
|
||||||
if value, ok := sqlSettings["DEFAULT"]; ok {
|
if value, ok := sqlSettings["DEFAULT"]; ok {
|
||||||
additionalType = additionalType + "DEFAULT " + value
|
additionalType = additionalType + " DEFAULT " + value
|
||||||
}
|
}
|
||||||
|
|
||||||
if field.IsScanner {
|
if field.IsScanner {
|
||||||
|
|
Loading…
Reference in New Issue