Files
reloop-v2/backend/prisma/schema.prisma
reloop e8121e5bd0 fix(prisma): relax tag cascade to SetNull — QA-5.fix.C2 + M2
- 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).
2026-04-12 00:08:40 +09:00

4.2 KiB