diff --git a/backend/app/main.py b/backend/app/main.py index c7a85b6..0d5d493 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -354,6 +354,14 @@ async def lifespan(app: FastAPI): except Exception as e: logger.warning(f"⚠️ loss_tracker 초기화 실패 (non-critical): {e}") + # ── 전략 파라미터 DB 초기화 (config.py 기본값 → strategy_configs 테이블 seed) ── + try: + from app.services.strategy_config_service import strategy_cfg + await strategy_cfg.auto_init() + except Exception as e: + logger.warning(f"⚠️ strategy_cfg 초기화 실패 (non-critical): {e}") + # ──────────────────────────────────────────────────────────────────────────── + try: from app.models.models import StockAnalysis, TradeHistory, Portfolio from sqlalchemy import delete