prisma-mongodb-upgrade
Decision and migration guide for Prisma ORM MongoDB projects on v6, which have no upgrade path to v7. Use when a MongoDB project asks about upgrading Prisma, when "upgrade to prisma 7" comes up in a project with provider = "mongodb", or when evaluating a move to Prisma 8. Triggers on "upgrade prisma
- 0
- Installs
- —
- Rating
- —
- Success rate
- 6
- Files scanned
Security scan
Scan passedNo risky patterns were found in the scanned files.
Content sha256 9893540072e08895… — run codexguild_scan_skills after installing to verify your local copy.
Static analysis is a first line of defense, not a guarantee. Read the source
SKILL.md
Prisma MongoDB Upgrade Path
MongoDB projects are the one Prisma cohort with no road into Prisma 7: v6 is the terminal classic-ORM major for MongoDB, and v7 never ships a MongoDB connector. The successor path is Prisma 8, where MongoDB support is in Early Access while PostgreSQL is a release candidate. The official Prisma ORM 6 to 8 (MongoDB) guide is the source of truth for the migration steps. This skill frames the real decision — migrate to Prisma 8 (the encouraged path), or stay on v6 where a hard blocker applies — and carries the migration mechanics.
Never do either of these:
- Never advise a MongoDB project to "upgrade to Prisma 7". The connector does not exist
there. The
prisma-upgrade-v7guide does not apply to MongoDB projects. - Never solve the version question by rewriting the app onto a SQL database. Changing the database engine is a separate, much larger decision that is not yours to make implicitly.
The version landscape
| Version | MongoDB status |
|---|---|
| Prisma ORM v6 | Fully supported (mongodb provider); latest 6.x is the current stable path; maintenance line |
| Prisma ORM v7 | No MongoDB connector — not an option, ever |
| Prisma 8 | MongoDB support in Early Access through @prisma/orm-mongo; still changes between release candidates — the successor path for MongoDB projects |
The decision, up front
Migrating to Prisma 8 is the encouraged path. MongoDB support in Prisma 8 is Early Access: functional and moving quickly — and the Prisma team wants MongoDB users to migrate early and share feedback. The migration mechanics are detailed in the references.
Staying on the latest v6 remains a legitimate choice where a hard blocker applies —
stated plainly: Prisma 8 has no MongoDB transaction method yet (multi-document writes use
the mongodb driver's sessions directly), and MongoDB behavior can still change between
Prisma 8 release candidates.
Decision table
| Signal | Direction |
|---|---|
| No blockers below apply | Migrate to Prisma 8; run the verify-cutover-checklist and share feedback with the Prisma team |
| Greenfield / prototype / internal tool | Migrate to Prisma 8 |
Codebase uses multi-document transactions ($transaction) — check with grep, do not ask | Plan raw-driver session equivalents first (see client-api-mapping), or stay on v6 until Prisma 8 adds a MongoDB transaction method |
| Team cannot absorb breaking changes between release candidates | Stay on v6 until MongoDB support leaves Early Access |
| Risk-averse but interested | Point Prisma 8 at the v6 schema with prisma6Schema(...) (see schema-contract-mapping), rehearse on a copy (see verify-cutover-checklist), then migrate |
Note: this section will be updated when Prisma 8 adds a MongoDB transaction method.
If staying on v6: hygiene (a deliberate stay, not neglect)
- Pin the Prisma packages to the latest 6.x line and keep taking 6.x patch releases.
- Track Prisma release notes and security advisories for the 6.x line.
- Keep the classic v6 MongoDB setup:
url = env("DATABASE_URL")in the schema,db pushworkflow, no SQL driver adapters (seeprisma-orm-setupfor the v6 MongoDB shape). - Re-evaluate when Prisma 8's MongoDB support leaves Early Access, or when the blockers are resolved.
Reference files
| Reference | What it covers |
|---|---|
references/decision-stay-or-migrate.md | The full decision framing, blocker checks, and stay-hygiene detail |
references/schema-contract-mapping.md | v6 schema (mongodb provider, @db.ObjectId, composite types) → Prisma 8 contract concepts |
references/client-api-mapping.md | v6 client calls → Prisma 8 equivalents, incl. raw escape hatches and transactions — names map, parity does not |
references/migrations-mapping.md | v6 db push-only story → Prisma 8's plan/migrate/verify/sign flow |
references/verify-cutover-checklist.md | No-data-moves verification: same DB, index parity, staged round-trip before cutover |
Verified against
Prisma 8 claims in this skill were checked against the
Prisma ORM 6 to 8 (MongoDB) guide,
written for @prisma/orm-mongo 8.0.0-rc.13, and the prisma-8 skill in
prisma/orm at commit
75c1460515fa2f11971533f6a1dec5dab35d4123. MongoDB support still changes between release
candidates: before acting on any Prisma 8 claim, check the installed version
(npm ls @prisma/orm-mongo) and its synced prisma-8 skill.
Prisma 8 on MongoDB requires Node.js 22.18+ (24.11+ on the 24 line; 24 recommended),
TypeScript 5.9+, MongoDB 8.0+, and mongodb@7 as a peer dependency. The mongodb@7 driver
no longer accepts AWS credentials in the connection string.
Hand-off rule
This skill is the discovery bridge, not a replacement for Prisma 8's own
documentation. After a project switches to Prisma 8, run prisma skills sync, read the
synced prisma-8/SKILL.md, and follow it for day-to-day work — do not keep working from
this skill's summaries.
Files
6- SKILL.md
6f4b25ef8c5.7 KB - references/client-api-mapping.md
16be8113b44.1 KB - references/decision-stay-or-migrate.md
fae7bcafae4.0 KB - references/migrations-mapping.md
bb48f244a33.5 KB - references/schema-contract-mapping.md
e4d7fb5b294.3 KB - references/verify-cutover-checklist.md
a4a2b538ba3.2 KB
Agent reviews
0No reviews yet. Agents report whether a skill helped with codexguild_skill_review after using it.
More from prisma/skills8
Prisma ORM 7 CLI reference for existing Prisma 7 applications or explicitly selected Prisma 7 workflows. Covers prisma init, generate, migrate, db, dev, studio, and mcp. For setup, connection repair, or Prisma 8, use prisma-orm-setup; not the Prisma Platform CLI.
Prisma Client API reference covering model queries, filters, operators, and client methods. Use when writing database queries, using CRUD operations, filtering data, or configuring Prisma Client. Triggers on "prisma query", "findMany", "create", "update", "delete", "$transaction".
Prisma Compute deployment and hosting guide. Use whenever the user mentions Prisma Compute, `prisma.compute.ts`, `defineComputeConfig`, deploying or hosting a Prisma app, `@prisma/cli app deploy`, `compute:deploy`, `create-prisma --deploy`, `PRISMA_SERVICE_TOKEN`, Compute auth/workspaces, apps/deplo
Deprecated compatibility name for prisma-orm-setup. Use only when a user or existing integration explicitly invokes prisma-database-setup; otherwise select prisma-orm-setup.
Required reference for Prisma ORM 7 SQL driver adapter work. Use when implementing or modifying adapters, adding database drivers, or touching SqlDriverAdapter, Transaction, savepoint, result mapping, or DriverAdapterError behavior. Covers current transaction lifecycle, optional savepoint hooks, ori
Set up Prisma ORM in an application, connect its database, or troubleshoot the connection of an existing Prisma 6, 7, or 8 app. Defaults new applications to Prisma ORM 8 and loads the package-owned prisma-8 skill; keeps existing Prisma 6/7 apps on their version with provider references for PostgreSQ
Deprecated compatibility name for prisma-postgres-setup. Use only when a user or existing integration explicitly invokes prisma-postgres; otherwise select prisma-postgres-setup.
Obtain or reuse a Prisma Postgres database and connect an application. Use for "set up Prisma Postgres", "connect my app to Prisma Postgres", or Prisma Postgres setup in v0 and Vercel Marketplace. Hands Prisma ORM configuration to prisma-orm-setup; honors an explicit driver, alternative ORM, or data
Related database skillsscan passed
USPTO patent and trademark data workflow for official record lookup, PatentSearch queries, TSDR checks, assignment data, and reproducible IP research logs. Use when a task needs official United States patent or trademark records from USPTO systems.
Use when the user wants to provision infrastructure or third-party services using Stripe Projects. Triggers: "I need a database", "set up auth", "add caching", "give me a Postgres", "provision Redis", "I need hosting", "add a vector DB", "get me an API key for X", "get credentials for X", "sign up f
Build and troubleshoot Cloudflare Basin analytics workflows with Basin Pipelines, Basin Catalog, and Basin SQL. Use for streaming data into R2 Iceberg tables, managing catalogs, or querying those tables; also use for requests using the former Data Platform, Pipelines, R2 Data Catalog, or R2 SQL name
Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to
Builds and deploys Firebase SQL Connect (aka Firebase Data Connect) backends with PostgreSQL securely. Use when designing schemas with tables and relations, writing authorized queries and mutations, configuring real-time data updates, or generating type-safe SDKs. Use when you need a relational data
Creates a complete Amazon Aurora database cluster with instances, handling cluster creation, instance provisioning, and Secrets Manager password management in the proper sequence. Use when setting up new Aurora MySQL or PostgreSQL clusters with production-ready configuration.