14 lines
395 B
Python
14 lines
395 B
Python
"""Simple file to set up the sqlmodel connection to database."""
|
|
|
|
from sqlmodel import SQLModel, create_engine
|
|
|
|
from dakiny_bot.logger import dakiny_logger
|
|
|
|
from . import models # noqa: F401 - Need this import for creating the models.
|
|
|
|
url = "sqlite:///database/dakiny.db"
|
|
dakiny_logger.info("Connected to local dev database.")
|
|
engine = create_engine(url)
|
|
|
|
SQLModel.metadata.create_all(engine)
|