I'm using SQLModel for FastAPI. But I don't know how to create 'text' column type using it.
How can I create 'text' column? Thank you for reading it.
from sqlmodel import SQLModel, Field
class BaseModel(SQLModel):
col_1: str = Field(default='Y')
col_2: str = Field(default='N')
col_3: str = Field(default='0')
col_4: str = Field(default='0')
this is my solution!
from sqlmodel import SQLModel, Field
from sqlalchemy import Column, TEXT
class BaseModel(SQLModel):
col_5: str = Field(sa_column=Column(TEXT))