Skip to content

Commit

Permalink
chore: ensure macro is prepared for potential pretty printing improve…
Browse files Browse the repository at this point in the history
  • Loading branch information
tjallingt authored Nov 8, 2023
1 parent d9e2447 commit 44a6db5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion awto-macros/src/proc_macros/schema/database_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ impl DatabaseTableModel {
"type is not suppoerted",
));
};
let db_type_is_text = ty.to_string().ends_with(":: Text");
let ty_string = ty.to_string();
let db_type_is_text = ty_string.ends_with("::Text") || ty_string.ends_with(":: Text");
if let Some(max_len) = &field.attrs.max_len {
if !db_type_is_text {
return Err(syn::Error::new(
Expand Down

0 comments on commit 44a6db5

Please sign in to comment.