Link every match to its referee via referee_id - #21
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
referee_idforeign key to every one of the 488 match records indata/matches/{year}.json, resolving each match to its head referee indata/referees.json(created in a prior milestone). This is a purely additive schema change: no existing field, value, oridwas touched, and no referee name/code is duplicated inline — only the UUID. Closes #20.Type of change
data/was wrong)(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) anddocs/referees-match-mapping.md(the canonical match-to-referee assignment, same source used to buildreferees.jsonitself). No new research was performed — this PR is a mechanical join of the two already-verified sources.Checklist
docs/CONTRIBUTING.md)composer testpasses locally (106 passed, 16853 assertions)idvalues were not regenerated (UUIDs are permanent — seedocs/CONVENTIONS.md)docs/CHANGELOG.mdupdated under "Unreleased" (required for any change todata/)docs/CONVENTIONS.md/docs/DATA_MODEL.mdupdated:DATA_MODEL.md'sMATCHschema (table + ER diagram) documents the newreferee_idfield, theREFEREE ||--o{ MATCHrelationship was added to both the entity diagram and the cross-entity example, and thereferees.jsonentity note no longer says "not yet linked";DATA_SOURCES.mdupdated;tests/MatchesTest.phpupdated (referee_idadded to the required-fields-in-order check, plus a new referential-integrity test againstdata/referees.json).