Start testing with sqlmodel.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
from sqlmodel import BigInteger, Column, Field, SQLModel, create_engine
|
||||
|
||||
|
||||
class Guilds(SQLModel, table=True):
|
||||
id: int = Field(sa_column=Column(BigInteger(), primary_key=True))
|
||||
name: str = Field(max_length=95)
|
||||
submission_channel: int = Field(sa_column=Column(BigInteger()))
|
||||
verification_channel: int = Field(sa_column=Column(BigInteger()))
|
||||
active: bool = Field(default=True)
|
||||
|
||||
|
||||
url = "sqlite:///database.db"
|
||||
engine = create_engine(url)
|
||||
SQLModel.metadata.create_all(engine)
|
||||
Reference in New Issue
Block a user