prisma-mongodb-upgrade

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

Updated Aug 19, 2026
One-click install
npx skills add https://github.com/nethangabrielb/tasks-app-practical-exam --skill prisma-mongodb-upgrade-nethangabrielb
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prisma-mongodb-upgrade
Source: https://github.com/nethangabrielb/tasks-app-practical-exam/tree/main/packages/database/.agents/skills/prisma-mongodb-upgrade
Command: npx skills add https://github.com/nethangabrielb/tasks-app-practical-exam --skill prisma-mongodb-upgrade-nethangabrielb

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 (transactions usage, MongoDB server version, pre-1.0 tolerance) that determines whether to migrate to Prisma Next or stay on the latest v6 with proper hygiene. - Migration Mappings: Reference guides translating v6 schema concepts (@db.ObjectId, composite types), client API calls ($runCommandRaw, $transaction, aggregations), and the db push workflow into Prisma Next's contract, client, and plan/migrate/verify/sign lifecycle. - Cutover Verification: A 10-step checklist for a no-data-moves cutover — same database, index parity, validator impact, staged read-only soak, and code-only rollback. - Use Case: A team on Prisma 6 with MongoDB asks about upgrading. The Skill greps the codebase for $transaction, checks the MongoDB server version (8.0+ required), then walks them through a staged Prisma Next migration or a pinned v6 stay. ## Quick Start Ask the assistant to evaluate whether your Prisma 6 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 a Prisma MongoDB project to Prisma 7?▼

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

How do I migrate from Prisma v6 MongoDB to Prisma Next?▼

Author a Prisma Next contract describing your existing collections, then run the plan, migrate, verify, and sign lifecycle against the same database — no data moves. Follow the cutover checklist: confirm MongoDB 8.0+, check index parity, and run a staged read-only soak before switching writes.

Does Prisma Next support MongoDB transactions?▼

The Prisma Next Mongo 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 with startSession and withTransaction on a replica set.

What happens to $runCommandRaw and aggregateRaw in Prisma Next?▼

Those v6 method names do not exist in Prisma Next. Raw operations move to the mongoRaw lane exposing aggregate, insertOne, updateOne, and similar methods, while typed aggregations use the pipeline builder; arbitrary database commands go through the mongodb driver directly.

When should a MongoDB project stay on Prisma v6 instead of migrating?▼

Stay on v6 when the codebase relies on multi-document $transaction and cannot plan driver-session equivalents, or when the team cannot absorb pre-1.0 breaking changes between Prisma Next minors. Pin the latest 6.x, keep taking patches, and re-evaluate at Prisma Next MongoDB GA.

Does Prisma Next MongoDB support Prisma Migrate?▼

Yes, unlike v6 where MongoDB only had db push. Prisma Next provides first-class contract-driven migrations for MongoDB with plan, migrate, verify, and sign steps, plus a db update command as the push-style alternative for local prototyping.