mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 17:40:55 +00:00
Generate default value while run ORM cmd tool
This commit is contained in:
parent
469f283b68
commit
7b7a95677a
@ -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