This repository has been archived on 2025-04-28. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
off-cooldown-bot/off-cooldown-bot/database/db.py
T

12 lines
339 B
Python

"""Simple file to set up the sqlmodel connection to database."""
from sqlmodel import SQLModel, create_engine
from . import models # noqa: F401 - Need this import for creating the models.
url = "sqlite:///database.db"
engine = create_engine(url)
# Don't need to create all when connected to prod.
SQLModel.metadata.create_all(engine)