Spaces:
Sleeping
Sleeping
Aissugur Kurganbekov
Claude Opus 4.8 (1M context)
Recruiter-demo polish: curated demo questions, reset-db, PDF test, CORS
49eecdc Download backend/app/reset_db.py from financeflow/ai: direct link, hf CLI and curl.
- Browser
- Download file 558 Bytes
-
https://huggingface.co/spaces/financeflow/ai/resolve/main/backend/app/reset_db.py
- Command line
-
hf download hf://spaces/financeflow/ai/backend/app/reset_db.py
-
curl -L -o reset_db.py https://huggingface.co/spaces/financeflow/ai/resolve/main/backend/app/reset_db.py
558 Bytes
| """Reset the database: drop all tables and recreate the empty schema. | |
| python -m app.reset_db | |
| Useful for a clean demo or when the local DB gets into a bad state. | |
| """ | |
| from .database import Base, engine | |
| from .logging_config import setup_logging | |
| from . import models # noqa: F401 (ensure models are registered on Base) | |
| def main() -> None: | |
| setup_logging() | |
| Base.metadata.drop_all(bind=engine) | |
| Base.metadata.create_all(bind=engine) | |
| print("Database reset: all tables dropped and recreated (empty).") | |
| if __name__ == "__main__": | |
| main() | |