From c6ce739b2a4d3b26af9326a31723883b4f136a74 Mon Sep 17 00:00:00 2001 From: Jinzhu Date: Sat, 10 Feb 2018 19:25:58 +0800 Subject: [PATCH] Convert auto_increment's value to lower case when checking its value --- dialect_common.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dialect_common.go b/dialect_common.go index 1e5e3b61..fbbaef33 100644 --- a/dialect_common.go +++ b/dialect_common.go @@ -40,7 +40,7 @@ func (commonDialect) Quote(key string) string { func (s *commonDialect) fieldCanAutoIncrement(field *StructField) bool { if value, ok := field.TagSettings["AUTO_INCREMENT"]; ok { - return value != "FALSE" + return strings.ToLower(value) != "false" } return field.IsPrimaryKey }