Convert auto_increment's value to lower case when checking its value

This commit is contained in:
Jinzhu 2018-02-10 19:25:58 +08:00
parent 2940c553eb
commit c6ce739b2a
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ func (commonDialect) Quote(key string) string {
func (s *commonDialect) fieldCanAutoIncrement(field *StructField) bool { func (s *commonDialect) fieldCanAutoIncrement(field *StructField) bool {
if value, ok := field.TagSettings["AUTO_INCREMENT"]; ok { if value, ok := field.TagSettings["AUTO_INCREMENT"]; ok {
return value != "FALSE" return strings.ToLower(value) != "false"
} }
return field.IsPrimaryKey return field.IsPrimaryKey
} }