diff --git a/src/app.py b/src/app.py index c4326e6e..d0113259 100644 --- a/src/app.py +++ b/src/app.py @@ -20,6 +20,7 @@ import tempfile import zipfile import jwt +import logging import base64 from cryptography.hazmat.primitives import serialization @@ -49,7 +50,10 @@ @asynccontextmanager async def lifespan(app: FastAPI): - db.alembic_upgrade() + try: + db.alembic_upgrade() + except Exception: + logging.exception("Failed to apply migrations. Trying to continue...") yield