diff --git a/sqlmodel/sql/sqltypes.py b/sqlmodel/sql/sqltypes.py index 512daacbab..e8e3fc6bc1 100644 --- a/sqlmodel/sql/sqltypes.py +++ b/sqlmodel/sql/sqltypes.py @@ -11,6 +11,6 @@ class AutoString(types.TypeDecorator): # type: ignore def load_dialect_impl(self, dialect: Dialect) -> "types.TypeEngine[Any]": impl = cast(types.String, self.impl) - if impl.length is None and dialect.name == "mysql": + if impl.length is None and dialect.name in ("mysql", "mariadb"): return dialect.type_descriptor(types.String(self.mysql_default_length)) return super().load_dialect_impl(dialect)