Spaces:
Runtime error
Runtime error
Greg
Claude Opus 4.7 (1M context)
Preparar despliegue en fly.io: monolito dockerizado + seeder demo
6aa6081 Download backend/fix_migration.py from Talosware/talos-access: direct link, hf CLI and curl.
- Browser
- Download file 606 Bytes
-
https://huggingface.co/spaces/Talosware/talos-access/resolve/main/backend/fix_migration.py
- Command line
-
hf download hf://spaces/Talosware/talos-access/backend/fix_migration.py
-
curl -L -o fix_migration.py https://huggingface.co/spaces/Talosware/talos-access/resolve/main/backend/fix_migration.py
606 Bytes
| 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") | |