The upsert key is (year, team1_id, team2_id, date), so when Wikipedia updates a placeholder bracket entry to real opponents, the old pairing is never overwritten — it just accumulates alongside the new one. Before upserting a knockout match, delete any existing match in the same year+round that involves either team but isn't the exact same pairing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>