Uh oh!
There was an error while loading. Please reload this page.
db/analytics-code: social.py offering re-keying (epic slice PR4) - #270
Conversation
…courses table
The academics split (0020/0022) already re-keyed class analytics to the
offering (course_concept_stats→offering_concept_stats, course_summary→
offering_summary) and offering-keyed course_context_service.py. The lone
holdout was routes/social.py::get_students, which still read
table("courses").select("user_id,course_name") — a query against the old
offering-shaped courses table that no longer has user_id or per-enrollment rows.
Resolve a user's courses through the enrollment chain instead
(enrollments → course_offerings → courses) via the PostgREST embedded join,
deduping across offerings of the same abstract course. Response shape of
GET /api/social/students is unchanged.
Adds tests/test_social_students.py (5 tests). No new migrations.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>Deploying with |
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs | frontend-staging | 736abc1 | Commit Preview URL Branch Preview URL | Jun 24 2026, 08:37 AM |
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Analytics slice (migration 0022). Academics already did the table renames + all of
course_context_service; the only holdout wasroutes/social.py::get_students, now readingenrollments → course_offerings → courses. +5 tests; green; ruff clean.Plan:
docs/superpowers/plans/2026-06-24-db-analytics-code.md. Independent — safe to merge early.