prisma-mongodb-upgrade

oleh prisma

Panduan keputusan dan migrasi untuk proyek MongoDB Prisma ORM di v6, yang tidak memiliki jalur upgrade ke v7. Gunakan ketika proyek MongoDB menanyakan tentang upgrade Prisma, ketika "upgrade ke prisma 7" muncul dalam proyek dengan provider = "mongodb", atau ketika mengevaluasi perpindahan ke Prisma Next. Memicu pada "upgrade prisma mongodb", "prisma 7 mongodb", "mongodb prisma migration", "prisma next mongodb".

npx skills add https://github.com/prisma/skills --skill prisma-mongodb-upgrade

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 Next, where MongoDB support is in Early Access with GA planned after Postgres. This skill frames the real decision — migrate to Prisma Next (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

VersionMongoDB status
Prisma ORM v6Fully supported (mongodb provider); latest 6.x is the current stable path; maintenance line
Prisma ORM v7No MongoDB connector — not an option, ever
Prisma NextMongoDB support in Early Access, actively developed, GA planned after Postgres — the successor path for MongoDB projects

The decision, up front

Migrating to Prisma Next is the encouraged path. MongoDB support in Prisma Next is Early Access: functional and moving quickly, with GA planned after Postgres — 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: the Next Mongo façade does not wrap transactions yet (the underlying driver is available directly; this is expected to change soon), and pre-1.0 minors can carry breaking changes with published upgrade recipes.

Decision table

SignalDirection
No blockers below applyMigrate to Next; run the verify-cutover-checklist and share feedback with the Prisma team
Greenfield / prototype / internal toolMigrate to Next
Codebase uses multi-document transactions ($transaction) — check with grep, do not askPlan raw-driver session equivalents first (see client-api-mapping), or stay on v6 until the façade wrapper lands
Team cannot absorb pre-1.0 breaking upgrades between minorsStay on v6 until GA
Risk-averse but interestedRun a staged Next round-trip on a copy (see verify-cutover-checklist), then migrate

Note: the transactions gap is expected to close soon — this section will be updated when façade transactions merge in Prisma Next.

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-database-setup for the v6 MongoDB shape).
  • Re-evaluate when Prisma Next's MongoDB is GA, or when blockers for trying EA are resolved.

Reference files

ReferenceWhat it covers
references/decision-stay-or-migrate.mdThe full decision framing, blocker checks, and stay-hygiene detail
references/schema-contract-mapping.mdv6 schema (mongodb provider, @db.ObjectId, composite types) → Next contract concepts
references/client-api-mapping.mdv6 client calls → Next equivalents, incl. raw escape hatches and transactions — names map, parity does not
references/migrations-mapping.mdv6 db push-only story → Next's plan/migrate/verify/sign flow
references/verify-cutover-checklist.mdNo-data-moves verification: same DB, index parity, staged round-trip before cutover

Verified against

Behavioral claims about Prisma Next in this skill were verified against prisma/prisma-next at commit a2791c5dd59d579b4b3052942ae7f8fe5e2ee852 (pre-1.0, ~v0.14/0.15 line). Prisma Next moves quickly in Early Access: before acting on any Next-side claim, verify it against the version actually installed (check the project's @prisma-next/* versions and the prisma-next skills installed with it). Next's Mongo target requires MongoDB 8.0+ and expects mongodb@^7 as a user-supplied peer dependency.

Hand-off rule

This skill is the discovery bridge, not a replacement for Prisma Next's own documentation. After a project switches to Prisma Next, run Prisma Next's init/skill installation and follow its own skills (quickstart, contract, queries, migrations, runtime) for day-to-day work — do not keep working from this skill's summaries.

Lebih banyak skill dari prisma

prisma-cli-migrate-reset
prisma
prisma migrate reset
official
prisma-cli-validate
prisma
validasi prisma. Referensi saat menggunakan fitur Prisma ini.
official
prisma-next-extension-upgrade
prisma
Upgrade Prisma Next in your extension. Bumps every `@prisma-next/*` dependency to the requested target (or npm `latest`), runs the per-transition upgrade…
official
adr-review
prisma
Tinjau satu atau lebih ADR dengan perspektif baru (sebagai anggota tim tanpa konteks sebelumnya), identifikasi masalah naratif dan struktural, lalu tulis ulang. Gunakan ketika…
official
prisma-next-upgrade
prisma
Upgrade Prisma Next in your app. Bumps every `@prisma-next/*` dependency from the version pinned in the lockfile to the requested target (or npm `latest`),…
official
prisma-cli
prisma
We need to translate the given text from English to Bahasa Indonesia. The text is a description of a directory item for an agent skill named "prisma-cli". The instruction says to preserve the name "prisma-cli" but not include it unless it appears in the source text. The source text does not include the name "prisma-cli" explicitly; it says "Prisma CLI" which is different. So we should not add "prisma-cli". We translate the text inside <text> only. The text: "Complete reference for Prisma CLI commands, options, and workflows across setup, migrations, and database operations. Covers 20+ commands organized by priority: setup ( init ), generation ( generate ), development ( dev ), database operations ( db pull/push/seed/execute ), and migrations ( migrate dev/deploy/reset/status/diff/resolve ) Includes Prisma 7.x changes: new prisma.config.ts configuration file, removed flags ( --skip-generate , --skip-seed , --schema , --url ), and explicit..." We
official
prisma-client-api
prisma
We need to translate the given text from English to Bahasa Indonesia. The text is a description of a Prisma Client API reference. We must preserve the name "prisma-client-api" but it's not in the text, so we don't include it. We must not add any extra commentary, labels, etc. Just translate the text. The text: "Complete Prisma Client API reference for model queries, CRUD operations, filtering, relations, and transactions. Covers 17 model query methods including findUnique , findMany , create , update , delete , upsert , and bulk operations with return variants Provides query options for shaping results: select , include , omit , orderBy , take , skip , cursor , and distinct Includes scalar and logical filter operators ( equals , in , contains , startsWith , lt , gt ) plus relation filters ( some ,..." Note: The text ends with "some ,..." which seems incomplete, but we translate as is. Translation: "Referensi lengkap API Prisma Client untuk kueri model, operasi CRUD, pemfilteran,
official
prisma-compute
prisma
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`, `auth workspace`, Compute apps/deployments/build logs/domains, `@prisma/cli agent install`, localhost vs `0.0.0.0`, deploy port binding, or framework deploy readiness for Hono, Elysia, Next.js, TanStack Start, Astro, Nuxt, Svelte,...
developmentdevopsofficial