diff --git a/sea-orm-macros/src/derives/entity_model.rs b/sea-orm-macros/src/derives/entity_model.rs index eba2d33f..f3a8d4a2 100644 --- a/sea-orm-macros/src/derives/entity_model.rs +++ b/sea-orm-macros/src/derives/entity_model.rs @@ -100,20 +100,8 @@ pub fn expand_derive_entity_model(data: Data, attrs: Vec) -> syn::Res )); } } else if name == "auto_increment" { - if let Lit::Str(litstr) = &nv.lit { - auto_increment = match litstr.value().as_str() { - "true" => true, - "false" => false, - _ => { - return Err(Error::new( - field.span(), - format!( - "Invalid auto_increment = {}", - litstr.value() - ), - )) - } - }; + if let Lit::Bool(litbool) = &nv.lit { + auto_increment = litbool.value(); } else { return Err(Error::new( field.span(),