First Check
Commit to Help
Example Code
class DeviceStore(SQLModel):
"""
Devices of one batch
"""
# __abstract__ = True
id: Optional[int] = Field(None, primary_key=True,
sa_column_kwargs={"autoincrement": True})
name: str
class DeviceBatch01(DeviceStore):
__tablename__ = "devicebatch01"
class DeviceBatch02(DeviceStore):
__tablename__ = "devicebatch02"
Description
I'm new here and learning to use sqlmodel, it's really great, now I got a question which is how to use sqlmodel dynamically to create tables, all my tables have the same format, just the table names are different, like logtable_2205, logtable_2206, logtable_2207. . . could you guys provide some ideas? thanks a lot.
Operating System
Windows
Operating System Details
No response
SQLModel Version
0.0.6
Python Version
Python 3.8.10
Additional Context
No response
First Check
Commit to Help
Example Code
Description
I'm new here and learning to use sqlmodel, it's really great, now I got a question which is how to use sqlmodel dynamically to create tables, all my tables have the same format, just the table names are different, like logtable_2205, logtable_2206, logtable_2207. . . could you guys provide some ideas? thanks a lot.
Operating System
Windows
Operating System Details
No response
SQLModel Version
0.0.6
Python Version
Python 3.8.10
Additional Context
No response