Commit Graph

9 Commits

Author SHA1 Message Date
alex 55ba9b62d6 fix: improve test isolation and configuration
- Use in-memory SQLite for tests to prevent conflicts
- Add try/finally for robust test cleanup
- Make database URL configurable via env var
- Make CORS origins configurable via env var
- Make SQL echo configurable via env var
2026-05-11 21:25:35 +02:00
alex 878e303cc6 feat: setup FastAPI main app with routers and test fixtures
- Main FastAPI app with all routers included
- CORS middleware for frontend
- Test fixtures with in-memory SQLite database
- Placeholder routers for future tasks
2026-05-11 21:22:55 +02:00
alex 955ed9db49 fix: jobs router session handling, schedule creation, and tests
- Use new session in background task for thread safety
- Fix schedule creation to associate with job
- Fix schedule endpoint return type
- Update tests to use AsyncClient
- Add missing tests for list, get, delete, schedule
- Add updated_at field to Schedule model
2026-05-11 21:20:31 +02:00
alex 1f1ed72494 feat: add jobs CRUD API with manual execution
- Full CRUD for backup jobs
- Manual job trigger endpoint with background execution
- Schedule creation endpoint
- Tests for job creation, update, execution, and 404 cases
2026-05-11 21:12:01 +02:00
alex 0d0f41d616 feat: add sources CRUD API with tests
- Full CRUD endpoints for backup sources
- Pydantic validation for source types
- pytest tests for create, list, get, delete
2026-05-11 20:59:11 +02:00
alex 83c3075de0 fix: update pydantic schemas to v2 syntax
- Replace Config class with ConfigDict
- Add cron expression validation
- Add missing updated_at to Schedule
- Add JobExecutionUpdate schema
2026-05-11 20:50:35 +02:00
alex 76cf5054be feat: add pydantic schemas for API validation 2026-05-11 20:47:48 +02:00
alex caf5bcb172 fix: address database model quality issues
- Fix mutable default arguments with lambda
- Add indexes on foreign keys
- Replace deprecated datetime.utcnow
- Add __repr__ methods for debugging
- Remove redundant primary key indexes
2026-05-11 20:46:03 +02:00
alex 13488f7b21 feat: add database models and alembic setup
- SQLAlchemy async models for sources, jobs, schedules, executions, backups, settings
- Alembic migration configuration
2026-05-11 20:43:23 +02:00