You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Async**: All routes and service functions must be `async def`; use `AsyncSession` (never `Session`); use `aiosqlite` (never `sqlite3`); use SQLAlchemy 2.0 `select()` (never `session.query()`)
-**Models**: `PlayerRequestModel` (no `id`, used for POST/PUT) and `PlayerResponseModel` (includes `id: UUID`, used for GET/POST responses); never use the removed `PlayerModel`
43
+
-**Primary key**: UUID surrogate key (`id`) — opaque, internal, used for all CRUD operations. UUID v4 for API-created records; UUID v5 (deterministic) for migration-seeded records. `squad_number` is the natural key — human-readable, domain-meaningful, preferred lookup for external consumers
-`HyphenatedUUID` custom `TypeDecorator` in `schemas/player_schema.py` storing UUIDs as hyphenated `CHAR(36)` strings in SQLite, returning `uuid.UUID` objects in Python (#66)
53
+
47
54
### Changed
48
55
56
+
-`PlayerModel` split into `PlayerRequestModel` and `PlayerResponseModel` in `models/player_model.py` (#66)
57
+
- All route path parameters and service function signatures updated from `int` to `uuid.UUID` (#66)
58
+
- POST conflict detection changed from ID lookup to `squad_number` uniqueness check (#66)
59
+
-`tests/player_stub.py` updated with UUID-based test fixtures (#66)
60
+
-`tests/test_main.py` updated to assert UUID presence and format in API responses (#66)
61
+
-`PlayerResponseModel` redeclared with `id` as first field to control JSON serialization order (#66)
62
+
-`HyphenatedUUID` methods now have full type annotations and Google-style docstrings; unused `dialect` params renamed to `_dialect` (#66)
63
+
- Service logger changed from `getLogger("uvicorn")` to `getLogger("uvicorn.error")`, aligned with `main.py` (#66)
64
+
-`logger.error(f"...")` replaced with `logger.exception("...: %s", error)` in all `SQLAlchemyError` handlers (#66)
65
+
- EN dashes replaced with ASCII hyphens in `seed_002` log and argparse strings (#66)
66
+
-`logger.error` replaced with `logger.exception` in `sqlite3.Error` handlers in `seed_001` and `seed_002` (#66)
67
+
49
68
### Deprecated
50
69
51
70
### Removed
52
71
53
72
### Fixed
54
73
74
+
- POST/PUT/DELETE routes now raise `HTTP 500` on DB failure instead of silently returning success (#66)
75
+
- Cache cleared only after confirmed successful create, update, or delete (#66)
76
+
- DELETE test is now self-contained; no longer depends on POST test having run first (#66)
77
+
- UUID assertion in GET all test replaced with explicit `_is_valid_uuid()` validator (#66)
78
+
- Emiliano Martínez `middleName` corrected from `""` to `None` in `seed_001` (#66)
0 commit comments