f0550e2ae1
CI / Build, lint & test (push) Successful in 2m50s
Kits are ownership-backed club items: the owned instance stays in the generic owned_cards inventory and only the two active roles get their own table. This mirrors the squad_managers precedent and keeps every FIFA-specific resourceId/wire concern in the game adapter. * migration 0024: club_kit_assignments(club_id, slot, owned_card_id) with a UNIQUE owned_card_id (one instance cannot hold both roles) and ON DELETE CASCADE from owned_cards so a quick-sell clears the role. * a BEFORE UPDATE OF club_id trigger clears the designation on a market transfer, which moves ownership by UPDATE and so is not covered by the cascade. * set_active_club_kits replaces BOTH slots in one transaction, rejects home == away, and validates each instance against current club ownership, so a half-applied or dangling designation is not representable. * get_active_club_kits revalidates ownership on read, so a stale row can never surface another club's item. * GET/PUT /club/kits expose the pair. Tests cover restart persistence, replace/clear without duplicates, atomic rejection of invalid references, and clearing via delete and transfer.