bug fixed #210
This commit is contained in:
parent
f2d3be988e
commit
5af80770ea
|
@ -773,7 +773,11 @@ func (engine *Engine) mapType(v reflect.Value) *core.Table {
|
||||||
col.IsPrimaryKey = true
|
col.IsPrimaryKey = true
|
||||||
col.Nullable = false
|
col.Nullable = false
|
||||||
case k == "NULL":
|
case k == "NULL":
|
||||||
|
if j == 0 {
|
||||||
|
col.Nullable = true
|
||||||
|
} else {
|
||||||
col.Nullable = (strings.ToUpper(tags[j-1]) != "NOT")
|
col.Nullable = (strings.ToUpper(tags[j-1]) != "NOT")
|
||||||
|
}
|
||||||
/*case strings.HasPrefix(k, "AUTOINCR(") && strings.HasSuffix(k, ")"):
|
/*case strings.HasPrefix(k, "AUTOINCR(") && strings.HasSuffix(k, ")"):
|
||||||
col.IsAutoIncrement = true
|
col.IsAutoIncrement = true
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue