diff --git a/apps/api/app/api/routes/health.py b/apps/api/app/api/routes/health.py index 592fb59bb..950d765d6 100644 --- a/apps/api/app/api/routes/health.py +++ b/apps/api/app/api/routes/health.py @@ -185,3 +185,16 @@ def debug_alembic(): except Exception as e: import traceback return {"error": str(e), "trace": traceback.format_exc()[-1000:]} + + +@router.get("/debug/ls-alembic") +def debug_ls_alembic(): + import os + out = {} + for d in ["/app/alembic/versions", "/app/migrations"]: + try: + out[d] = sorted(os.listdir(d)) if os.path.isdir(d) else f"NOT_DIR: {os.path.exists(d)}" + except Exception as e: + out[d] = str(e) + out["cwd"] = os.getcwd() + return out