mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 19:10:54 +00:00
Merge pull request #654 from wb14123/cmd_default
Generate default value while run ORM cmd tool
This commit is contained in:
commit
f92ce9af96
@ -144,6 +144,10 @@ func getDbCreateSql(al *alias) (sqls []string, tableIndexes map[string][]dbIndex
|
||||
column += " " + "NOT NULL"
|
||||
}
|
||||
|
||||
if fi.initial.String() != "" {
|
||||
column += " DEFAULT " + fi.initial.String()
|
||||
}
|
||||
|
||||
if fi.unique {
|
||||
column += " " + "UNIQUE"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user