You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(schema-drift): detect indirect model usage via Prisma relation closure
The schema-drift agent was incorrectly flagging models as unused when they
were only referenced via Prisma include clauses (e.g. ContentQuestion used
via prisma.contentQuiz.findMany({ include: { questions: true } })).
Fix: after collecting directly used models, expand the set transitively
through schema relations — if model A is used and has a relation to model B,
B is considered in use regardless of direct prisma.B calls.
This prevents false-positive "remove this model" suggestions that would
break applications relying on included relations.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
0 commit comments