提交 f92ce9af 编写于 作者: A astaxie

Merge pull request #654 from wb14123/cmd_default

Generate default value while run ORM cmd tool
......@@ -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"
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册