From cc15df67ee02ac386ed7d0cb4ee8f949a67288d5 Mon Sep 17 00:00:00 2001 From: Automated Action Date: Tue, 10 Jun 2025 15:47:02 +0000 Subject: [PATCH] Fix import * statement in main.py - Move wildcard import from app.db.all_models to module level - Fix SyntaxError that was preventing application startup - Ensure all models are registered with SQLAlchemy Base --- main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 1b415a5..0f11b57 100644 --- a/main.py +++ b/main.py @@ -6,6 +6,9 @@ from fastapi.openapi.utils import get_openapi from app.api.api_v1.api import api_router from app.core.config import settings + +# Import all models to ensure they are registered with Base +from app.db.all_models import * # noqa from app.db.base import Base from app.db.session import engine @@ -17,8 +20,6 @@ logger = logging.getLogger(__name__) def create_tables(): try: logger.info("Creating database tables") - # Import all models to ensure they are registered with Base - from app.db.all_models import * # noqa Base.metadata.create_all(bind=engine) logger.info("Database tables created successfully") except Exception as e: