prisma-mongodb-upgrade

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

Updated Aug 31, 2026
One-click install
npx skills add https://github.com/Akhand0ps/vecta --skill prisma-mongodb-upgrade-akhand0ps
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-mongodb-upgrade
Source: https://github.com/Akhand0ps/vecta/tree/main/packages/db/.agents/skills/prisma-mongodb-upgrade
Command: npx skills add https://github.com/Akhand0ps/vecta --skill prisma-mongodb-upgrade-akhand0ps

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? MongoDB projects on Prisma v6 have no upgrade path to Prisma 7, which ships no MongoDB connector. This Skill prevents the two common 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 covering $transaction usage, MongoDB server version (8.0+ required), and tolerance for pre-1.0 breaking changes, with grep-based codebase checks instead of guesswork. - API and Schema Mappings: Reference tables translating v6 client calls ($runCommandRaw, findRaw, aggregateRaw, $transaction) and schema concepts (@db.ObjectId, composite types, @@map storage names) to Prisma Next equivalents. - Cutover Verification Checklist: A 10-step no-data-moves checklist covering index parity, $jsonSchema validator impact, staged read-only soak, and rollback strategy. - Use Case: A team on Prisma 6 with MongoDB asks whether to upgrade to Prisma 7. The Skill checks their codebase for transaction usage, confirms their MongoDB server version, and walks them through a staged Prisma Next migration against the same database. ## Quick Start Ask the assistant to evaluate whether your Prisma v6 MongoDB project should migrate to Prisma Next and to check the 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 7 has 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 v6 MongoDB project to Prisma Next?

Author a Next contract describing your existing collections, then run the plan, migrate, verify, and sign flow against the same database — no data moves. Check for blockers first: grep for $transaction usage and confirm your MongoDB server is 8.0 or newer.

Does Prisma Next support MongoDB transactions?

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

What MongoDB server version does Prisma Next require?

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

When should I stay on Prisma v6 instead of migrating?

Stay on v6 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 Next minors. Pin the latest 6.x line, keep taking patches, and re-evaluate at Prisma Next MongoDB GA.

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

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.