prisma-mongodb-upgrade

Guides Prisma v6 MongoDB projects through migration to Prisma Next or deliberate v6 retention.

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

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 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 stay on v6 with proper hygiene. ## 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 line. - Migration Mappings: Detailed references mapping v6 schema concepts, client API calls ($runCommandRaw, $transaction, aggregateRaw), and the db push workflow onto Prisma Next's contract model, mongoRaw lane, 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 provider = "mongodb" asks about upgrading to Prisma 7. The Skill intercepts the impossible request, greps the codebase for $transaction usage, checks the MongoDB server version, and produces a staged migration plan to Prisma Next. ## 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 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+, verify 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 directly available as a peer dependency. Multi-document atomicity works today via driver sessions (startSession and withTransaction) on a replica set.

What replaces $runCommandRaw and aggregateRaw in Prisma Next?

Those v6 method names do not exist in Prisma Next. Use the mongoRaw lane for raw collection operations like aggregate and insertOne, the typed aggregation-pipeline builder for aggregations, or the mongodb driver directly for arbitrary database commands.

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

Stay on v6 when the codebase relies on multi-document $transaction calls the team cannot yet port to driver sessions, 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 gives MongoDB first-class contract-driven migrations with plan, migrate, verify, and sign steps. A push-style db update command remains available for local prototyping without migration history.