bug fixed

This commit is contained in:
Lunny Xiao 2014-01-15 10:39:16 +08:00
parent 004974d44d
commit 6147651a6e
1 changed files with 4 additions and 0 deletions

View File

@ -298,6 +298,8 @@ func (col *Column) String(d dialect) string {
if col.Default != "" {
sql += "DEFAULT " + col.Default + " "
} else if col.IsVersion {
sql += "DEFAULT 1 "
}
return sql
@ -316,6 +318,8 @@ func (col *Column) stringNoPk(d dialect) string {
if col.Default != "" {
sql += "DEFAULT " + col.Default + " "
} else if col.IsVersion {
sql += "DEFAULT 1 "
}
return sql