Skip to content

Commit df7bbcf

Browse files
RaschidJFRankur-archclaude
authored
docs: add MongoDB migration guide from v6 to Prisma Next (#8111)
* docs(guides): add mongo migration guide from v6 to next * improve information order * wrap examples in tabs * Improve sections 3e and beyond * remove leftover md file * Validate guide against prisma-next 0.16.0; fix adoption flow, ObjectId filters, and raw-command mapping Every command and snippet now runs against a live v6 database on mongodb-memory-server (mongod 8.0.4 replica set) migrated to @prisma-next/mongo@0.16.0. Changes that came out of that run: - Step 4: db init refuses a populated v6 database (validator adds are classed destructive), and migration plans start from an empty baseline without a ref, so the adoption path is db update --advance-ref db, with plan/migrate/verify for every change after that. - 3c: the typed pipeline builder passes ObjectId values through as strings, so match on an ObjectId field silently returns nothing; grouped example no longer filters by authorId and a warning shows the working rawCommand + ObjectId pattern. - 3e/quick reference: $runCommandRaw maps to sharing one MongoClient with the mongo() binding (mongoClient + dbName), shown end to end; collection-scoped escapes point at db.query.rawCommand. - Checklist: restore same-database and MongoDB 8.0+ items; rehearsal commands now match the adoption flow. - Step 2: note that every discriminator value in existing data needs a declared variant with at least one field. - Align snippets with the actual init scaffold (contract.d import, non-null env assertions), storage-value enum row in common mistakes, relative docs links, em-dash cleanup. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Ankur Datta <64993082+ankur-arch@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent e7c445a commit df7bbcf

3 files changed

Lines changed: 460 additions & 1 deletion

File tree

apps/docs/content/docs/guides/next/meta.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"pages": [
44
"index",
55
"frameworks",
6-
"runtimes"
6+
"runtimes",
7+
"upgrade-prisma-orm"
78
]
89
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"title": "Upgrade Prisma ORM",
3+
"pages": [
4+
"mongodb"
5+
]
6+
}

0 commit comments

Comments
 (0)