a879e412 by slene

#514

1 parent 50bc1ef7
...@@ -194,7 +194,7 @@ type User struct { ...@@ -194,7 +194,7 @@ type User struct {
194 UserName string `orm:"size(30);unique"` 194 UserName string `orm:"size(30);unique"`
195 Email string `orm:"size(100)"` 195 Email string `orm:"size(100)"`
196 Password string `orm:"size(100)"` 196 Password string `orm:"size(100)"`
197 Status int16 197 Status int16 `orm:"column(Status)"`
198 IsStaff bool 198 IsStaff bool
199 IsActive bool `orm:"default(1)"` 199 IsActive bool `orm:"default(1)"`
200 Created time.Time `orm:"auto_now_add;type(date)"` 200 Created time.Time `orm:"auto_now_add;type(date)"`
......
...@@ -80,7 +80,6 @@ func getTableUnique(val reflect.Value) [][]string { ...@@ -80,7 +80,6 @@ func getTableUnique(val reflect.Value) [][]string {
80 80
81 // get snaked column name 81 // get snaked column name
82 func getColumnName(ft int, addrField reflect.Value, sf reflect.StructField, col string) string { 82 func getColumnName(ft int, addrField reflect.Value, sf reflect.StructField, col string) string {
83 col = strings.ToLower(col)
84 column := col 83 column := col
85 if col == "" { 84 if col == "" {
86 column = snakeString(sf.Name) 85 column = snakeString(sf.Name)
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!