提交 17a9c3c3 编写于 作者: A astaxie

ORM:revert default value

上级 8946f816
......@@ -148,9 +148,9 @@ func getDbCreateSql(al *alias) (sqls []string, tableIndexes map[string][]dbIndex
column += " " + "NOT NULL"
}
if fi.initial.String() != "" {
column += " DEFAULT " + fi.initial.String()
}
//if fi.initial.String() != "" {
// column += " DEFAULT " + fi.initial.String()
//}
if fi.unique {
column += " " + "UNIQUE"
......
......@@ -205,7 +205,7 @@ type User struct {
Password string `orm:"size(100)"`
Status int16 `orm:"column(Status)"`
IsStaff bool
IsActive bool `orm:"default(TRUE)"`
IsActive bool `orm:"default(1)"`
Created time.Time `orm:"auto_now_add;type(date)"`
Updated time.Time `orm:"auto_now"`
Profile *Profile `orm:"null;rel(one);on_delete(set_null)"`
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册