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 col.Nullable {
|
||||
sql += "NULL "
|
||||
|
@ -87,10 +91,6 @@ func (col *Column) String(d Dialect) string {
|
|||
}
|
||||
}
|
||||
|
||||
if col.Default != "" {
|
||||
sql += "DEFAULT " + col.Default + " "
|
||||
}
|
||||
|
||||
return sql
|
||||
}
|
||||
|
||||
|
@ -99,6 +99,10 @@ func (col *Column) StringNoPk(d Dialect) string {
|
|||
|
||||
sql += d.SqlType(col) + " "
|
||||
|
||||
if col.Default != "" {
|
||||
sql += "DEFAULT " + col.Default + " "
|
||||
}
|
||||
|
||||
if d.ShowCreateNull() {
|
||||
if col.Nullable {
|
||||
sql += "NULL "
|
||||
|
@ -107,10 +111,6 @@ func (col *Column) StringNoPk(d Dialect) string {
|
|||
}
|
||||
}
|
||||
|
||||
if col.Default != "" {
|
||||
sql += "DEFAULT " + col.Default + " "
|
||||
}
|
||||
|
||||
return sql
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue