We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fee8227 commit 35c5b40Copy full SHA for 35c5b40
sqlmodel/main.py
@@ -655,6 +655,9 @@ def get_sqlalchemy_type(field: Any) -> Any:
655
type_ = get_sa_type_from_field(field)
656
metadata = get_field_metadata(field)
657
658
+ # Checks for `Literal` type annotation
659
+ if type_ is Literal:
660
+ return AutoString
661
# Check enums first as an enum can also be a str, needed by Pydantic/FastAPI
662
if issubclass(type_, Enum):
663
return sa_Enum(type_)
0 commit comments