2025-06-01 10:05:16 +00:00

17 lines
398 B
Python

import logging
from app.db.session import Base, engine
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
def init_db() -> None:
"""
Initialize the database.
Creates all tables defined in the models.
"""
# Create tables
logger.info("Creating database tables")
Base.metadata.create_all(bind=engine)
logger.info("Database tables created")