Repository navigation
fix: remove the "Times" screen, which managed a 2017 table nothing reads (#99) - #111
Merged
Merged
Conversation
…ads (#99) Closes #99. /backend/teams sat in the main admin sidebar and read `DB::table('teams')`, the Helium table from 2017 -- team_id, teamName, score. The contest's actual teams are rows in `users` with user_type='team', which is what SubmitController, Leaderboard, Score, BocaWebcastZipBuilder and the ICPC report all use. After #107 removed the other two readers, the audit was unambiguous: `exercises` has no reader or writer left anywhere, and `teams` had exactly one consumer -- this screen, which read, wrote and deleted its own table while nothing else ever looked at what it wrote. Not a screen that had fallen out of date; a closed loop that was never connected to anything. Both reference implementations model this the same way, and neither the way this screen did: BOCA has one usertable and one admin/user.php; a team is a user with type='team'. There is no teams table and no teams screen. CD-MOJ's source of truth is contests/<id>/users/<login>/, one directory per account. It does have a "Times" screen, but read what it is: "Identidade de cada conta no placar: nome do time, país/bandeira, sede, universidade, brasão e foto" -- presentation metadata hanging off accounts, with the roster in a separate "Inscrições" screen. So the menu slot is worth having eventually; what occupied it was not it. #105 gave account editing a real home in /backend/users, and /site/teams already lists a site's real teams. The four legacy tables (teams, exercises, exercise_team, team_user) are deliberately left in place. Dropping them is irreversible and I cannot verify from here whether anything outside this repository reads that database -- an old report, an operations script. The screen is the part that was actively misleading, and removing it changes no data. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Pvf2R8xtgbWQm1wRvjBqQY
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.
Fecha a #99.
O
/backend/teamsestava no menu lateral principal e liaDB::table('teams')— a tabela Helium de 2017, comteam_id,teamName,score. As equipes de verdade são linhas emuserscomuser_type='team', que é o que oSubmitController, oLeaderboard, oScore, oBocaWebcastZipBuildere o relatório ICPC usam.Depois que a #107 tirou os outros dois leitores, a auditoria ficou sem ambiguidade:
Não era uma tela desatualizada. Era um circuito fechado: lia, escrevia e apagava a própria tabela, e nada mais jamais olhava o que ela escreveu.
As duas referências modelam igual — e nenhuma do jeito que essa tela fazia
BOCA tem uma
usertablee umadmin/user.php. Equipe é usuário comtype='team'. Não existe tabela de times nem tela de times.CD-MOJ tem como fonte da verdade
contests/<id>/users/<login>/, um diretório por conta. Ele tem uma tela "Times" — mas veja o que ela é:Metadado de apresentação pendurado nas contas, com o roster numa tela separada ("Inscrições").
Ou seja: a vaga no menu vale a pena existir um dia — para identidade de placar, bandeira, brasão, foto. O que ocupava ela não era isso. E a #105 já deu à edição de conta um lugar de verdade em
/backend/users, enquanto o/site/teamsjá lista as equipes reais de uma sede.As tabelas ficam
teams,exercises,exercise_teameteam_usercontinuam onde estão, de propósito. Dropar é irreversível e eu não consigo verificar daqui se algo fora deste repositório lê esse banco — um relatório antigo, um script de operação. A tela era a parte que enganava ativamente; removê-la não mexe em dado nenhum.Se alguém confirmar que nada externo lê, o
dropé uma migration de três linhas numa issue própria.Suíte: 799 verdes.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Pvf2R8xtgbWQm1wRvjBqQY