bug fixed
This commit is contained in:
parent
bfeb6ea19f
commit
bd1487ba55
|
@ -62,10 +62,10 @@ func (db *mssql) SqlType(c *core.Column) string {
|
||||||
|
|
||||||
var hasLen1 bool = (c.Length > 0)
|
var hasLen1 bool = (c.Length > 0)
|
||||||
var hasLen2 bool = (c.Length2 > 0)
|
var hasLen2 bool = (c.Length2 > 0)
|
||||||
if hasLen1 {
|
if hasLen2 {
|
||||||
res += "(" + strconv.Itoa(c.Length) + ")"
|
|
||||||
} else if hasLen2 {
|
|
||||||
res += "(" + strconv.Itoa(c.Length) + "," + strconv.Itoa(c.Length2) + ")"
|
res += "(" + strconv.Itoa(c.Length) + "," + strconv.Itoa(c.Length2) + ")"
|
||||||
|
} else if hasLen1 {
|
||||||
|
res += "(" + strconv.Itoa(c.Length) + ")"
|
||||||
}
|
}
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,10 +70,11 @@ func (db *mysql) SqlType(c *core.Column) string {
|
||||||
|
|
||||||
var hasLen1 bool = (c.Length > 0)
|
var hasLen1 bool = (c.Length > 0)
|
||||||
var hasLen2 bool = (c.Length2 > 0)
|
var hasLen2 bool = (c.Length2 > 0)
|
||||||
if hasLen1 {
|
|
||||||
res += "(" + strconv.Itoa(c.Length) + ")"
|
if hasLen2 {
|
||||||
} else if hasLen2 {
|
|
||||||
res += "(" + strconv.Itoa(c.Length) + "," + strconv.Itoa(c.Length2) + ")"
|
res += "(" + strconv.Itoa(c.Length) + "," + strconv.Itoa(c.Length2) + ")"
|
||||||
|
} else if hasLen1 {
|
||||||
|
res += "(" + strconv.Itoa(c.Length) + ")"
|
||||||
}
|
}
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,10 +44,10 @@ func (db *oracle) SqlType(c *core.Column) string {
|
||||||
|
|
||||||
var hasLen1 bool = (c.Length > 0)
|
var hasLen1 bool = (c.Length > 0)
|
||||||
var hasLen2 bool = (c.Length2 > 0)
|
var hasLen2 bool = (c.Length2 > 0)
|
||||||
if hasLen1 {
|
if hasLen2 {
|
||||||
res += "(" + strconv.Itoa(c.Length) + ")"
|
|
||||||
} else if hasLen2 {
|
|
||||||
res += "(" + strconv.Itoa(c.Length) + "," + strconv.Itoa(c.Length2) + ")"
|
res += "(" + strconv.Itoa(c.Length) + "," + strconv.Itoa(c.Length2) + ")"
|
||||||
|
} else if hasLen1 {
|
||||||
|
res += "(" + strconv.Itoa(c.Length) + ")"
|
||||||
}
|
}
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,10 +59,10 @@ func (db *postgres) SqlType(c *core.Column) string {
|
||||||
|
|
||||||
var hasLen1 bool = (c.Length > 0)
|
var hasLen1 bool = (c.Length > 0)
|
||||||
var hasLen2 bool = (c.Length2 > 0)
|
var hasLen2 bool = (c.Length2 > 0)
|
||||||
if hasLen1 {
|
if hasLen2 {
|
||||||
res += "(" + strconv.Itoa(c.Length) + ")"
|
|
||||||
} else if hasLen2 {
|
|
||||||
res += "(" + strconv.Itoa(c.Length) + "," + strconv.Itoa(c.Length2) + ")"
|
res += "(" + strconv.Itoa(c.Length) + "," + strconv.Itoa(c.Length2) + ")"
|
||||||
|
} else if hasLen1 {
|
||||||
|
res += "(" + strconv.Itoa(c.Length) + ")"
|
||||||
}
|
}
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue