f64e68e75115f1929e7501274125e4b82926a2e4
Schema: MentorAssignment becomes M:N (composite unique on (projectId, mentorId)). MentorFile re-scopes to projectId (team-wide); mentorAssignmentId becomes a nullable audit FK with SetNull. New MentorChangeRequest model + status enum. Behavior: - mentor.assign stacks mentors per team; per-team assignment email fires once per row (idempotent via notificationSentAt). - mentor.requestChange / listChangeRequests / resolveChangeRequest provide the change-request inbox; mentors are NOT notified, only admins. - Workspace files re-scoped to project so all co-mentors and team members share one file list and chat. - New inline FilePreview support in the mentor workspace. - mentor.getProjectMentors surfaces co-mentors on the mentor workspace. Migration: hand-written, idempotent guards, two-phase backfill on MentorFile.projectId. Verified against May 7 prod dump with rollback.sql. PRE-DEPLOY: pull a fresh prod DB dump and re-run the dry-run before applying the migration to prod (the May 7 snapshot may not include mentors added since by another admin). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Description
No description provided
Languages
TypeScript
99.5%
JavaScript
0.2%
Shell
0.2%
CSS
0.1%