Spaces:
Runtime error
Runtime error
File size: 606 Bytes
6aa6081 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | from app.core.database import SessionLocal
from sqlalchemy import text
import os
if os.path.exists("/app/alembic/versions/ff99fd874530_add_tolerance_to_accounts.py"):
os.remove("/app/alembic/versions/ff99fd874530_add_tolerance_to_accounts.py")
print("Deleted stale migration file")
else:
print("File not found")
db = SessionLocal()
r = db.execute(text("SELECT version_num FROM alembic_version")).scalar()
print(f"Current alembic version: {r}")
db.execute(text("UPDATE alembic_version SET version_num = 'ff99fd874530'"))
db.commit()
db.close()
print("Updated alembic version to ff99fd874530")
|