sendou.ink/app/features/badges
Kalle 4bc8033841 Collapse repeated manual badge grants into a count column
TournamentBadgeOwner previously stored manual grants as N identical
rows to represent "this user has this badge N times" — one user had
12,345 duplicate rows for a single badge. This adds a `count` column,
collapses NULL-tournamentId duplicates in the backfill, and rewrites
the BadgeOwner view to expose count via SUM. The table shrinks from
75,596 to 24,204 rows. Also adds an index on TournamentBadgeOwner(userId)
as defense-in-depth for direct lookups, and updates replaceOwners to
dedupe ownerIds at insert time. Profile-page query for the worst-case
user drops from ~4 ms to ~1–2 ms warm.
2026-05-14 18:09:41 +03:00
..
actions Refactor requireRole/requirePermission to resolve user internally 2026-02-24 20:02:37 +02:00
components Design refresh + a bunch of stuff (#2864) 2026-03-19 17:51:42 +02:00
loaders Upgrade to React Router 7 (#2681) 2025-12-29 19:21:11 +02:00
routes Update Biome to 2.4.8 2026-03-21 15:19:32 +02:00
BadgeRepository.server.test.ts Migrate synxXPBadges function to Kysely 2026-01-29 22:13:50 +02:00
BadgeRepository.server.ts Collapse repeated manual badge grants into a count column 2026-05-14 18:09:41 +03:00
badges-constants.ts Refactor app/constants away 2025-05-31 13:54:34 +03:00
badges-schemas.server.ts Upgrade zod package to 4 (#2677) 2025-12-29 20:04:40 +02:00
badges-utils.ts Refactor app/constants away 2025-05-31 13:54:34 +03:00
badges.module.css Migrate to nested CSS 2026-03-28 16:30:28 +02:00
homemade.json badge: add badge for Journey's End (#3071) 2026-05-14 16:31:10 +03:00