Problem
The current importer upserts rows present in the snapshot but does not retire Sections that disappeared. Production currently has 132 Section rows in the four synchronized semesters that are absent from the latest complete snapshot. Hard deletion would risk comments, descriptions, homeworks, subscriptions, and historical references.
Proposed migration
- Add explicit source lifecycle metadata such as sourceLastSeenAt/retiredAt.
- Mark missing in-scope Sections retired only after snapshot completeness validation.
- Hide retired rows from current catalog/calendar surfaces while keeping direct historical/user-content access intentionally defined.
- Preserve all user-generated content and audit every retirement/reactivation.
Acceptance criteria
- No hard deletion of stale Sections or children.
- Re-importing a Section clears retirement and restores it.
- Current catalog/calendar queries exclude retired rows; historical/direct access behavior is contract-tested.
- Production rollout includes before/after counts and a reversible backfill.
Evidence
Latest complete snapshot has 7,918 Sections; production has 8,049 rows across the same four semesters, with 132 production rows absent from the snapshot and one new snapshot row absent from production.
Problem
The current importer upserts rows present in the snapshot but does not retire Sections that disappeared. Production currently has 132 Section rows in the four synchronized semesters that are absent from the latest complete snapshot. Hard deletion would risk comments, descriptions, homeworks, subscriptions, and historical references.
Proposed migration
Acceptance criteria
Evidence
Latest complete snapshot has 7,918 Sections; production has 8,049 rows across the same four semesters, with 132 production rows absent from the snapshot and one new snapshot row absent from production.