Verification totals: handicap_engine.py unit tests went from 63 → 98 (all passing), plus 400+ scratch-API checks across the eight formats' test scripts, covering both frittstående runder and the appropriate org-scoped system (team or individual) for each. test_isolation.sql stayed 12/12 throughout — migrations 041–050 are purely additive.
A few real things surfaced and were fixed during testing:
Nassau can be blocked by the existing "match already decided" lock (ADR-012) if the overall 18-hole match closes early — documented as a known v1 limitation, not fixed (would mean loosening an established safety guard).
Københavner's points depend on all 3 players at once, breaking the usual "recompute one participant" pattern — handled with a dedicated recompute path.
High-low-high doesn't fit the existing win/loss/halved match cache, so it gets its own dedicated read endpoint (like Nassau) — verified digit-for-digit against your own worked example ("1-1 etter hull 1", "2-1 til lag 2").
Two missing-column crashes (caught in scratch, never reached anything resembling "done").
12 lines
803 B
SQL
12 lines
803 B
SQL
-- =====================================================================
|
|
-- TeeCup — Flaggturnering/Flag tournament (org individuell turnering),
|
|
-- migrasjon 046. Samme begrunnelse som 045 -- se den migrasjonens
|
|
-- header. Gjenbruker eksisterende tournament_round_participant.course_
|
|
-- handicap (allerede beregnet av _compute_round_participant_handicap
|
|
-- for ALLE scoring_method-verdier) -- INGEN nye kolonner.
|
|
-- =====================================================================
|
|
\set ON_ERROR_STOP on
|
|
|
|
ALTER TABLE tournament DROP CONSTRAINT tournament_scoring_method_check;
|
|
ALTER TABLE tournament ADD CONSTRAINT tournament_scoring_method_check
|
|
CHECK (scoring_method IS NULL OR scoring_method IN ('stroke_gross', 'stroke_net', 'stableford', 'copenhagen', 'bingo_bango_bongo', 'flag'));
|