使用SQLModel如何让 alembic 识别以下模型?
from sqlmodel import Field, SQLModel
class Hero(SQLModel, table=True):
id: int = Field(default=None, primary_key=True)
name: str
secret_name: str
age: Optional[int] = None
Run Code Online (Sandbox Code Playgroud)
我一直在研究的一种方法是导入 Alembic 的 SQLalchemy 模型,但查看源代码我找不到如何做到这一点。
如何使 Alembic 与 SQLModel 模型一起使用?