This commit is contained in:
4
main.py
4
main.py
@@ -216,7 +216,9 @@ async def lifespan(app: Starlette):
|
||||
try:
|
||||
import subprocess
|
||||
|
||||
result = subprocess.run(["alembic", "upgrade", "head"], check=False, capture_output=True, text=True, cwd="/app")
|
||||
result = subprocess.run(
|
||||
["alembic", "upgrade", "head"], check=False, capture_output=True, text=True, cwd="/app"
|
||||
)
|
||||
if result.returncode == 0:
|
||||
print("[lifespan] Database migrations completed successfully")
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user