17a9c3c3 by astaxie

ORM:revert default value

1 parent 8946f816
...@@ -148,9 +148,9 @@ func getDbCreateSql(al *alias) (sqls []string, tableIndexes map[string][]dbIndex ...@@ -148,9 +148,9 @@ func getDbCreateSql(al *alias) (sqls []string, tableIndexes map[string][]dbIndex
148 column += " " + "NOT NULL" 148 column += " " + "NOT NULL"
149 } 149 }
150 150
151 if fi.initial.String() != "" { 151 //if fi.initial.String() != "" {
152 column += " DEFAULT " + fi.initial.String() 152 // column += " DEFAULT " + fi.initial.String()
153 } 153 //}
154 154
155 if fi.unique { 155 if fi.unique {
156 column += " " + "UNIQUE" 156 column += " " + "UNIQUE"
......
...@@ -205,7 +205,7 @@ type User struct { ...@@ -205,7 +205,7 @@ type User struct {
205 Password string `orm:"size(100)"` 205 Password string `orm:"size(100)"`
206 Status int16 `orm:"column(Status)"` 206 Status int16 `orm:"column(Status)"`
207 IsStaff bool 207 IsStaff bool
208 IsActive bool `orm:"default(TRUE)"` 208 IsActive bool `orm:"default(1)"`
209 Created time.Time `orm:"auto_now_add;type(date)"` 209 Created time.Time `orm:"auto_now_add;type(date)"`
210 Updated time.Time `orm:"auto_now"` 210 Updated time.Time `orm:"auto_now"`
211 Profile *Profile `orm:"null;rel(one);on_delete(set_null)"` 211 Profile *Profile `orm:"null;rel(one);on_delete(set_null)"`
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!