prisma-mongodb-upgrade
This skill guides Prisma ORM MongoDB projects through a version decision and migration process, since v6 is the terminal version for MongoDB and v7 has no…
Identity proven by GitHub's verified organisation badge (prisma)
- Agents
- Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode, claude.ai and API
- License
- MIT (permissive)
- Pin
- be16a87pinned Oct 9, 2026
- Context cost
- about 1,300 tokenswhen the skill loads
- GitHub stars
- 67on prisma/skills
- Scripts
- None found
What it does
“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 mongodb", "prisma 7 mongodb", "mongodb prisma migration", "prisma 8 mongodb".”
Generated summary from the skill's own text
This skill guides Prisma ORM MongoDB projects through a version decision and migration process, since v6 is the terminal version for MongoDB and v7 has no MongoDB connector. It frames whether to migrate to Prisma 8 (Early Access MongoDB support) or stay on v6, then maps the migration mechanics including schema changes, client API differences, and cutover verification.
When to use it
- MongoDB project asks about upgrading from Prisma v6
- Evaluating Prisma 8 migration for MongoDB application
- Codebase needs to decide between staying on v6 or moving to v8
- Migrating MongoDB schema and queries between Prisma versions
When not to
- Project uses SQL database with Prisma, not MongoDB
- Upgrading non-MongoDB Prisma projects to v7 or v8
- Planning to change database engine from MongoDB to SQL
Install
These commands install from the publisher's repository and need no account.
skills CLI
npx skills add prisma/skills --skill prisma-mongodb-upgradeInstalls from the repository's default branch, which may have changed since the commit we checked.
GitHub CLI 2.90 or later
gh skill install prisma/skills prisma-mongodb-upgrade@be16a8740d01363d13552b317042431ee8dfc581Installs the commit we checked (be16a87).
Copy by hand
Download the folder at be16a87 and put it in .claude/skills/prisma-mongodb-upgrade for Claude Code and in .agents/skills/prisma-mongodb-upgrade for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.
Copy for your agent
A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.
Prompt
Install the agent skill "prisma-mongodb-upgrade" by Prisma. Source, pinned to commit be16a8740d01363d13552b317042431ee8dfc581: https://github.com/prisma/skills/tree/be16a8740d01363d13552b317042431ee8dfc581/prisma-mongodb-upgrade 1. Download that folder at exactly this commit. Do not use the default branch. 2. Copy every file unchanged, keeping the folder structure, into .claude/skills/prisma-mongodb-upgrade/ for Claude Code and .agents/skills/prisma-mongodb-upgrade/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist. 3. Do not edit the files, and do not run any script in the folder unless I ask you to. 4. When you are done, list the files you copied and where you put them. Listing and checks: https://www.agentnative.dev/skills/prisma/prisma-mongodb-upgrade
SKILL.md at the pin
---
name: prisma-mongodb-upgrade
description: 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 mongodb", "prisma 7 mongodb", "mongodb prisma migration", "prisma 8 mongodb".
license: MIT
metadata:
author: prisma
version: "0.2.0"
---
# 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](https://www.prisma.io/docs/orm/supported-databases)
while PostgreSQL is a release candidate. The official
[Prisma ORM 6 to 8 (MongoDB) guide](https://www.prisma.io/docs/guides/upgrade-prisma-orm/mongodb)
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-v7` guide 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 push`
workflow, no SQL driver adapters (see [`prisma-orm-setup`](../prisma-orm-setup/references/v6-mongodb.md) for 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](https://www.prisma.io/docs/guides/upgrade-prisma-orm/mongodb),
written for `@prisma/orm-mongo` 8.0.0-rc.13, and the `prisma-8` skill in
[prisma/orm](https://github.com/prisma/orm/tree/main/skills/prisma-8) 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.
From prisma/skills at be16a87, shown as plain text under its license: MIT (permissive). The license text is in prisma-mongodb-upgrade/SKILL.md.
View SKILL.md on GitHub at be16a87Files
- SKILL.md5.8 KB · 6f4b25ef8c7a
- references/
- client-api-mapping.md4.2 KB · 16be8113b404
- decision-stay-or-migrate.md4.1 KB · fae7bcafae34
- migrations-mapping.md3.6 KB · bb48f244a36d
- schema-contract-mapping.md4.4 KB · e4d7fb5b292b
- verify-cutover-checklist.md3.3 KB · a4a2b538ba38
6 files, 25 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.
Skill folder on GitHub at be16a87More from Prisma
prisma-8
This skill helps agents work with Prisma 8, a contract-first data layer for TypeScript projects.
Contains scripts
Claude Code, Codex, Cursor +3 · about 3.5K tokens · pinned 6 days ago
adr-review
This skill reviews Architecture Decision Records (ADRs) from a fresh perspective, identifying clarity and structural issues, then rewrites them for future…
Claude Code, Codex, Cursor +4 · about 590 tokens · pinned 6 days ago
ast-visitor-pattern
This skill teaches agents to use the visitor pattern with frozen subclasses for discriminated unions that need multiple dispatch sites.
Claude Code, Codex, Cursor +4 · about 710 tokens · pinned 6 days ago
bumping-biome
Updates the biome code formatter package to a specified version using pnpm, renames configuration files to biome.jsonc format, updates schema references, and…
Claude Code, Codex, Cursor +4 · about 290 tokens · pinned 6 days ago
contrib-pr
This skill guides external contributors through opening a pull request against prisma-next by following the project's contribution guidelines.
Claude Code, Codex, Cursor +4 · about 2.2K tokens · pinned 6 days ago
create-pr
This skill creates a GitHub pull request with a Linear-ticket-prefixed title and a decision-led narrative description for the prisma-next repository.
Claude Code, Codex, Cursor +4 · about 4.3K tokens · pinned 6 days ago
Related in Data and databases
prisma-next-contract
This skill enables editing the Prisma Next data contract, the single source of truth for your data layer.
by PrismaOfficial publisher
Claude Code, Codex, Cursor +4 · about 6.9K tokens · pinned 6 days ago
prisma-next-migrations
Author and execute Prisma Next migrations by choosing between quick database updates or formal migration plans with data transforms.
by PrismaOfficial publisher
Claude Code, Codex, Cursor +4 · about 10K tokens · pinned 6 days ago
prisma-next-queries
Write queries against Postgres, SQLite, or MongoDB using Prisma Next.
by PrismaOfficial publisher
Claude Code, Codex, Cursor +4 · about 3.5K tokens · pinned 6 days ago
prisma-next-runtime
This skill covers configuring and wiring the Prisma Next database runtime in db.ts, including choosing between Postgres, SQLite, or MongoDB facades, composing…
by PrismaOfficial publisher
Claude Code, Codex, Cursor +4 · about 6.1K tokens · pinned 6 days ago
vercel-storage
This skill guides agents through Vercel's storage ecosystem, including Blob for file uploads, Global Config for edge-accessible configuration, and Marketplace…
by VercelOfficial publisher
Claude Code, Codex, Cursor +3 · about 3.4K tokens · pinned 6 days ago
prisma-orm-setup
This skill sets up Prisma ORM in new applications, defaulting to version 8, or connects and troubleshoots existing Prisma 6, 7, or 8 applications.
by PrismaOfficial publisher
Claude Code, Codex, Cursor +4 · about 1.6K tokens · pinned 6 days ago