Skip to content

Commit 433ef53

Browse files
committed
update: Uses SmallInteger type for IntEnum
Updates the `IntEnum` SQLAlchemy type to `SmallInteger`. This change reduces the storage size required for `IntEnum` columns when the full range of `Integer` is not needed.
1 parent fecdbd2 commit 433ef53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sqlmodel/sql/sqltypes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def load_dialect_impl(self, dialect: Dialect) -> "types.TypeEngine[Any]":
2020

2121

2222
class IntEnum(types.TypeDecorator[Optional[_TIntEnum]]):
23-
impl = types.Integer
23+
impl = types.SmallInteger
2424
cache_ok = True
2525

2626
def __init__(self, enum_type: Type[_TIntEnum], *args: Any, **kwargs: Any):

0 commit comments

Comments
 (0)