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
Extend boot-seeding (from #45) to ensure default History and MembershipJobSchedule rows per managed club only — never for all known clubs (heavy History crawls against incidental scouted/opponent clubs would blow up the DB).
For each, idempotently seed a History and a Membership schedule scoped to that club_id. Per-club rows have a non-null club_id, so INSERT ... ON CONFLICT (kind, club_id) DO NOTHING works directly (unlike the global NULL-club_id rows in Bootstrap default JobSchedule rows for server-internal kinds at first boot #45, which needed a WHERE NOT EXISTS guard).
Defaults: History 24h, Membership 24h, both enabled; new scheduler.defaults.history / .membership HOCON blocks with ${?SCHEDULER_HISTORY_*} / ${?SCHEDULER_MEMBERSHIP_*} overrides.
Resurrection / don't-clobber: matches Bootstrap default JobSchedule rows for server-internal kinds at first boot #45 exactly — ON CONFLICT DO NOTHING leaves an existing (incl. edited/disabled) row untouched, and re-seeds a user-deleted row on the next boot. Off-switch is enabled = false on the live row, or unmanage the club.
Unmanaging a club does NOT delete its existing per-club job_schedule rows (job_schedule.club_id FKs club, not managed_club), so they keep firing. Should be a follow-up: delete/disable per-club schedules on ManagedClub.delete.
Depends on
managed_clubmarker (the non-leaky source of "my clubs").What
Extend boot-seeding (from #45) to ensure default
HistoryandMembershipJobSchedulerows per managed club only — never for all known clubs (heavy History crawls against incidental scouted/opponent clubs would blow up the DB).ManagedClub.selectClubIds).Historyand aMembershipschedule scoped to thatclub_id. Per-club rows have a non-nullclub_id, soINSERT ... ON CONFLICT (kind, club_id) DO NOTHINGworks directly (unlike the global NULL-club_idrows in Bootstrap default JobSchedule rows for server-internal kinds at first boot #45, which needed aWHERE NOT EXISTSguard).scheduler.defaultsHOCON block introduced in Bootstrap default JobSchedule rows for server-internal kinds at first boot #45 — addhistory/membershipentries.History/Membership(JobScheduler.runSchedule→requireClubSlug→HistoryApp.discover(slug)/MembershipApp.reconcile(slug)); no all-clubs History path is needed.Resolved (in #105)
ServerTables.ensureTables— mirrors Bootstrap default JobSchedule rows for server-internal kinds at first boot #45's seed model;ManagedClubApp.markstays untouched. A club marked managed while the server is up gets its schedules on the next boot.scheduler.defaults.history/.membershipHOCON blocks with${?SCHEDULER_HISTORY_*}/${?SCHEDULER_MEMBERSHIP_*}overrides.ON CONFLICT DO NOTHINGleaves an existing (incl. edited/disabled) row untouched, and re-seeds a user-deleted row on the next boot. Off-switch isenabled = falseon the live row, or unmanage the club.Out of scope (follow-up)
job_schedulerows (job_schedule.club_idFKsclub, notmanaged_club), so they keep firing. Should be a follow-up: delete/disable per-club schedules onManagedClub.delete.Relationship
Resolved by #105 (squash-merge
42a0559d81922afa7538a514fe80ab4d901edba3). Main CI green.