diff --git a/backend/app/db/session.py b/backend/app/db/session.py index 1b56b74..b872e66 100644 --- a/backend/app/db/session.py +++ b/backend/app/db/session.py @@ -87,7 +87,7 @@ def _warn_on_schema_drift() -> None: engine = create_engine(sync_url, pool_pre_ping=True) inspector = sa_inspect(engine) except Exception as exc: - logger.error("schema_drift_check_failed", error=str(exc)) + logger.error("schema_drift_check_failed: %s", str(exc)) engine.dispose() if "engine" in dir() else None # type: ignore[name-defined] return @@ -102,15 +102,15 @@ def _warn_on_schema_drift() -> None: if col.name not in db_cols: missing.append(f"COLUMN {table_name}.{col.name}") except Exception as exc: - logger.error("schema_drift_check_failed", error=str(exc)) + logger.error("schema_drift_check_failed: %s", str(exc)) finally: engine.dispose() if missing: logger.error( - "schema_drift_detected", - missing=missing, - hint="DB schema does not match models. Run scripts/check_schema.py for details.", + "schema_drift_detected: %s (hint: %s)", + missing, + "DB schema does not match models. Run scripts/check_schema.py for details.", )