fix: oracle default key in xorm tag error (#30)
This commit is contained in:
parent
da1adaf7a2
commit
7cd4078f0b
16
column.go
16
column.go
|
@ -79,6 +79,10 @@ func (col *Column) String(d Dialect) string {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if col.Default != "" {
|
||||||
|
sql += "DEFAULT " + col.Default + " "
|
||||||
|
}
|
||||||
|
|
||||||
if d.ShowCreateNull() {
|
if d.ShowCreateNull() {
|
||||||
if col.Nullable {
|
if col.Nullable {
|
||||||
sql += "NULL "
|
sql += "NULL "
|
||||||
|
@ -87,10 +91,6 @@ func (col *Column) String(d Dialect) string {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if col.Default != "" {
|
|
||||||
sql += "DEFAULT " + col.Default + " "
|
|
||||||
}
|
|
||||||
|
|
||||||
return sql
|
return sql
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,6 +99,10 @@ func (col *Column) StringNoPk(d Dialect) string {
|
||||||
|
|
||||||
sql += d.SqlType(col) + " "
|
sql += d.SqlType(col) + " "
|
||||||
|
|
||||||
|
if col.Default != "" {
|
||||||
|
sql += "DEFAULT " + col.Default + " "
|
||||||
|
}
|
||||||
|
|
||||||
if d.ShowCreateNull() {
|
if d.ShowCreateNull() {
|
||||||
if col.Nullable {
|
if col.Nullable {
|
||||||
sql += "NULL "
|
sql += "NULL "
|
||||||
|
@ -107,10 +111,6 @@ func (col *Column) StringNoPk(d Dialect) string {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if col.Default != "" {
|
|
||||||
sql += "DEFAULT " + col.Default + " "
|
|
||||||
}
|
|
||||||
|
|
||||||
return sql
|
return sql
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue