You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CCAS has no first-class representation of "a club the user manages". The club table holds many clubs — most are scouted/opponent/recruited-from clubs ingested incidentally, not clubs the user runs CCAS for. Today the only way to tell them apart is leaky side-effect signals (e.g. "has a recruitment_alias" or "has a membership_run"), which conflate management with having run a job once — reconciling an opponent club's roster to scout it would falsely mark it managed.
This bites any feature that must act on "my clubs" rather than "all known clubs" — directly surfaced while rescoping #45 (default scheduled jobs), where seeding History/Membership for all clubs would blow up the DB.
Proposal
Introduce a minimal, first-class managed-club marker:
New table managed_club (club_id BIGINT PRIMARY KEY REFERENCES club(club_id) ON DELETE RESTRICT) (preferred over a club.managed boolean — keeps lifecycle concerns out of the club row and extends cleanly).
A club becomes managed by an explicit act, never derived — candidates: a new ccas manage <slug> command, on first recruitment-criteria set, and/or via CLI club-context: current_club + ccas use <slug> #86's ccas use <slug>. (Pick the trigger(s) as part of this issue.)
Problem
CCAS has no first-class representation of "a club the user manages". The
clubtable holds many clubs — most are scouted/opponent/recruited-from clubs ingested incidentally, not clubs the user runs CCAS for. Today the only way to tell them apart is leaky side-effect signals (e.g. "has arecruitment_alias" or "has amembership_run"), which conflate management with having run a job once — reconciling an opponent club's roster to scout it would falsely mark it managed.This bites any feature that must act on "my clubs" rather than "all known clubs" — directly surfaced while rescoping #45 (default scheduled jobs), where seeding History/Membership for all clubs would blow up the DB.
Proposal
Introduce a minimal, first-class managed-club marker:
managed_club (club_id BIGINT PRIMARY KEY REFERENCES club(club_id) ON DELETE RESTRICT)(preferred over aclub.managedboolean — keeps lifecycle concerns out of theclubrow and extends cleanly).(user_id, club_id)and the existing rows migrate to the bootstrap user.ccas manage <slug>command, on first recruitment-criteria set, and/or via CLI club-context: current_club + ccas use <slug> #86'sccas use <slug>. (Pick the trigger(s) as part of this issue.)Club/newManagedClubcompanion:createTable,selectAll/selectIds,markManaged(clubId),unmanage(clubId),isManaged(clubId).Uses
ScheduleRoutes("only schedule per-club jobs for managed clubs").Out of scope
Relationship