Prisma: Unique constraint failed—what should I change?
Summary As of October 2026, check P2002 and the unique field before changing writes; use upsert() only when update-or-create is the intended behavior. Prisma ORM v6 guidance checked 2026-10-28; concurrent upserts can still collide.