- SkillSnapshot.tagId: Int → Int?, Tag relation → onDelete: SetNull
- StudyLog.tag: explicit onDelete: SetNull (was implicit Restrict)
- DashboardService.summary() filters { tagId: { not: null } } so orphaned
snapshots don't leak into the top-skills UI
- Schema header notes that prisma migrate dev --name relax_tag_cascade
must run on Dev VM before deploy
Prevents silent data loss when users delete a tag (previous cascade
erased all skill history for that tag permanently).
4.2 KiB
4.2 KiB