7b7a9567 by Bin Wang

Generate default value while run ORM cmd tool

1 parent 469f283b
......@@ -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"
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!