prisma-mongodb-upgrade

Guides Prisma v6 MongoDB projects through migration decisions and cutover to Prisma Next.

Updated Jul 26, 2026
One-click install
npx skills add https://github.com/PrimotionStudio/turbo-repo-is-cool --skill prisma-mongodb-upgrade-primotionstudio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-mongodb-upgrade
Source: https://github.com/PrimotionStudio/turbo-repo-is-cool/tree/main/packages/db/.agents/skills/prisma-mongodb-upgrade
Command: npx skills add https://github.com/PrimotionStudio/turbo-repo-is-cool --skill prisma-mongodb-upgrade-primotionstudio

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Prisma ORM v7 ships no MongoDB connector, leaving MongoDB projects on v6 with no standard upgrade path. This Skill prevents the two failure modes — advising an impossible v7 upgrade or silently rewriting the app onto SQL — and frames the real decision: migrate to Prisma Next (Early Access MongoDB support) or deliberately stay on v6. ## Core Features & Use Cases - Decision Framework: A blocker-check table (transactions usage, MongoDB server version, tolerance for pre-1.0 breaking changes) that determines whether to migrate to Prisma Next or stay on the latest v6 line. - Migration Mappings: Reference guides translating v6 schema concepts (@db.ObjectId, composite types), client API calls ($runCommandRaw, findRaw, $transaction), and the db push workflow into Prisma Next contract, query, and migration equivalents. - Cutover Verification Checklist: A 10-step no-data-moves checklist covering index parity, validator impact, storage-name addressing, and staged read-only soak before switching writes. - Use Case: A team on Prisma 6 with provider = "mongodb" asks about upgrading to Prisma 7. The Skill intercepts the question, greps the codebase for $transaction usage, checks the MongoDB server version, and produces a staged migration plan to Prisma Next — or a justified stay-on-v6 hygiene plan. ## Quick Start Ask the assistant whether your Prisma 6 MongoDB project should upgrade to Prisma 7 and have it check your codebase for migration blockers.

Frequently Asked Questions about prisma-mongodb-upgrade

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Can I upgrade Prisma 6 MongoDB to Prisma 7?

No. Prisma ORM v7 ships no MongoDB connector, so v6 is the terminal classic-ORM major for MongoDB projects. The forward path is Prisma Next, where MongoDB support is in Early Access with GA planned after Postgres.

How do I migrate a Prisma MongoDB project to Prisma Next?

Author a Prisma Next contract describing your existing collections, then run the plan, migrate, verify, and sign flow against the same database — no data moves. Follow the cutover checklist covering index parity, validator impact, and a staged read-only soak before switching writes.

Does Prisma Next support MongoDB transactions?

The Prisma Next Mongo client façade does not wrap db.transaction yet, but the underlying mongodb driver is a user-supplied peer dependency and fully accessible. Multi-document atomicity works today via driver sessions using client.startSession() and session.withTransaction() on a replica set.

What MongoDB server version does Prisma Next require?

Prisma Next's Mongo target requires MongoDB 8.0 or later and mongodb@^7 installed as a user-supplied peer dependency. Prisma v6 tolerated older server versions, so check your server version before planning a migration.

When should I stay on Prisma v6 instead of migrating?

Stay on the latest v6 line when your codebase relies on multi-document $transaction calls you cannot yet port to driver sessions, or when your team cannot absorb pre-1.0 breaking changes between Prisma Next minors. Keep taking 6.x patch releases and re-evaluate when Prisma Next's MongoDB support reaches GA.

Why does db.orm.User return undefined in Prisma Next?

Prisma Next's Mongo ORM is addressed by collection storage names, not model names. Use db.orm.users — the @@map name or lowercased model name — instead of db.orm.User, which is the most common porting mistake from v6.