Skip to content

Link every match to its referee via referee_id - #21

Merged
pawelMSoftware merged 1 commit into
mainfrom
data/20-link-matches-to-referees
Jul 21, 2026
Merged

Link every match to its referee via referee_id#21
pawelMSoftware merged 1 commit into
mainfrom
data/20-link-matches-to-referees

Conversation

@pawelMSoftware

Copy link
Copy Markdown
Owner

Summary

Adds a referee_id foreign key to every one of the 488 match records in data/matches/{year}.json, resolving each match to its head referee in data/referees.json (created in a prior milestone). This is a purely additive schema change: no existing field, value, or id was touched, and no referee name/code is duplicated inline — only the UUID. Closes #20.

Type of change

  • Data correction (a value in data/ was wrong)
  • New tournament / new records
  • Documentation
  • Test suite

(This PR adds a schema-wide FK, so it touches data/, its supporting docs, and its test file together — checked all three boxes above.)

Source

data/referees.json (the FK target) and docs/referees-match-mapping.md (the canonical match-to-referee assignment, same source used to build referees.json itself). No new research was performed — this PR is a mechanical join of the two already-verified sources.

Checklist

  • One logical change per PR (see docs/CONTRIBUTING.md)
  • composer test passes locally (106 passed, 16853 assertions)
  • Record id values were not regenerated (UUIDs are permanent — see docs/CONVENTIONS.md)
  • docs/CHANGELOG.md updated under "Unreleased" (required for any change to data/)
  • docs/CONVENTIONS.md / docs/DATA_MODEL.md updated: DATA_MODEL.md's MATCH schema (table + ER diagram) documents the new referee_id field, the REFEREE ||--o{ MATCH relationship was added to both the entity diagram and the cross-entity example, and the referees.json entity note no longer says "not yet linked"; DATA_SOURCES.md updated; tests/MatchesTest.php updated (referee_id added to the required-fields-in-order check, plus a new referential-integrity test against data/referees.json).

@pawelMSoftware pawelMSoftware self-assigned this Jul 21, 2026
@pawelMSoftware
pawelMSoftware merged commit 51e536b into main Jul 21, 2026
2 checks passed
@pawelMSoftware
pawelMSoftware deleted the data/20-link-matches-to-referees branch July 21, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Link every match to its referee via referee_id

1 participant