From a0d20bd55fa8adb306a42efceb542dee197b1a6f Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Thu, 1 Oct 2026 21:00:33 +0800 Subject: [PATCH] =?UTF-8?q?debug:=20=E6=B7=BB=E5=8A=A0=20/debug/ls-alembic?= =?UTF-8?q?=20=E5=88=97=E5=87=BA=E5=AE=B9=E5=99=A8=E5=86=85=E8=BF=81?= =?UTF-8?q?=E7=A7=BB=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/api/app/api/routes/health.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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