Spaces:
Sleeping
Sleeping
Commit History
-
Upload folder using huggingface_hub
Verified signature100ddbe
-
fix: lazy-initialize DB engine in standalone scripts
Replace direct imports of `engine` and `SessionLocal` from `app.db.session` with local instantiation via `get_database_url()` in create_db, insert_data, and query_db scripts. Prevents DB connection attempts at import time when environment variables are not yet loaded.e1edad9
-
feat: add PostgreSQL database layer with SQLAlchemy ORM
- Add Employee and Prediction SQLAlchemy models (app/db/models.py) - Add database session/engine configuration from env vars (app/db/session.py) - Add script to create database and tables if not exists (scripts/create_db.py) - Add docker-compose with PostgreSQL + pgAdmin services - Update .env.example with DB_* connection variables - Add psycopg2-binary, SQLAlchemy, greenlet to requirements.txt - Document database schema, UML diagram and column constraints in READMEa194bc8