| Adopt / set up / first steps | references/quickstart.md | new project, existing database, "what can I do with Prisma 8", "where do I start", "just ran createprisma", npx create-prisma, first steps, first query, prisma orm init greenfield setup, contract infer + db sign brownfield adoption, connect-write-read first arc, day-to-day commands (contract emit, db init, db update, migration plan, db migrate, db schema, db verify), flags --target / --authoring / --schema-path / --probe-db / --output |
| Edit the data contract | references/contract.md | schema, models, fields, attributes, relations, indexes, enums, value objects (composite types), type aliases, namespaces (Postgres schemas), cross-contract foreign keys (cross-space FK), polymorphic types (@@discriminator / @@base), extension namespaces (pgvector.Vector(...), postgis.Geometry(...)), prisma.config.ts / definePrismaConfig / ormConfig, prisma contract emit, PSL, contract.prisma, contract.ts, contract.json, contract.d.ts, @internal/postgres/config, @internal/postgres/contract-builder, @internal/mongo/config, extensions:, pgvector, postgis, paradedb, Temporal / temporal-polyfill / RUNTIME.TEMPORAL_UNAVAILABLE, @@control, control policy (managed / tolerated / external / observed), soft delete, validations, callbacks |
| Author migrations | references/migrations.md | db update vs migration plan, db migrate, migration new, migration show, db update --dry-run, db verify, db sign, data migration, dataTransform, placeholder sentinels in framework-rendered migration.ts, MIGRATION.HASH_MISMATCH, MIGRATION.UNFILLED_PLACEHOLDER, data-loss questions (--delete, --rename, --allow, CLI.CONSENT_REQUIRED), schema drift |
| Migration graph, refs, plan origin | references/migration-model.md | migration graph, refs, migration ref set / list / delete, the db ref, --advance-ref, --no-advance-ref, migration plan --from, from: (baseline) in plan output, greenfield / from-scratch plan, baseline, first migration before deploy (Composer / CD-managed databases), chaining migrations, retrofitting migrations onto an existing database, MIGRATION.HASH_NOT_IN_GRAPH, MIGRATION.PATH_UNREACHABLE at plan/chain time |
| Review migrations on deploy | references/migration-review.md | "what migrations are going to run", "what runs on deploy / merge", merge conflict, diamond convergence, concurrent migrations, migration status, ref management for CI, staging / production environment refs, MIGRATION.MARKER_NOT_IN_HISTORY, MIGRATION.MISSING_INVARIANTS, db migrate --show |
| Write queries | references/queries.md | query, where, select, project, orderBy, limit, offset, take, skip, include, lookup, first, all, count, aggregate, groupBy, create, update, delete, upsert, returning, transaction, db.orm, db.sql, runtime.query(plan) vs runtime.execute(plan), db.prepare / prepared statements, streaming / for await, many-to-many include and nested connect, and / or / not from @prisma/orm-postgres/orm-client, db.query.from(...) (Mongo pipeline), namespace-aware accessors, .all() Thenable, single-use iterators (RUNTIME.ITERATOR_CONSUMED), target-declared aggregate types (count, integer sum, and integer avg are number; count and integer sum throw outside ±(2^53 − 1) rather than round, while avg is a fraction already and carries no guard; countBigInt / sumBigInt / avgDecimal are the lossless forms, avgDecimal on PostgreSQL only), custom collection class (extends Collection), with and query fragments (QueryFragment, Filtered, Ordered), shared query fragments and scopes (db.orm.fragment(fields, body) for a filter on every model with given fields, CodecField, db.orm.public.Post.fragment(...) for a shared select / include, orderByField for an order or sort parameter from a request), drizzle-style, kysely-style. Naming types (§ Naming model and result types): "type of my model", "return type of a query", ResultType, Scalars, Shape, models / Models namespace in contract.d.ts, Models.public_User, Prisma 7 Prisma.User / GetPayload / UserGetPayload equivalents. Postgres/SQLite specifics: references/queries-postgres.md; Mongo specifics: references/queries-mongo.md |
| Wire the runtime | references/runtime.md | db.ts, postgres<Contract>(...) / sqlite<Contract>(...) / mongo<Contract>(...) façades, middleware composition (lints, budgets, cache via @prisma/orm-extension-middleware-cache, custom afterQuery middleware, @prisma/orm-postgres/family-runtime), DATABASE_URL, .env, connection pool / poolOptions, dev vs prod config, transactions, read replicas, multi-database, script won't exit / hangs, db.close / pool.end, await using / [Symbol.asyncDispose] |
| Build-tool integration | references/build.md | Vite plugin (@internal/vite-plugin-contract-emit, Vite 7/8), vite.config.ts, contract emit on save, HMR / dev server, Next.js / Webpack / esbuild / Rollup / Turbopack (named gaps, not fabricated) |
| Supabase | references/supabase.md | @internal/extension-supabase, RLS, row level security, policies (policy_select / policy_update / @@rls, auth.uid()), role binding (asUser(jwt) / asAnon() / asServiceRole()), auth.users, cross-space FKs to supabase:auth.AuthUser, JWT / JWKS (SUPABASE_JWKS_URL, SUPABASE_JWT_SECRET), SUPABASE.JWT_INVALID, SUPABASE.CONFIG_INVALID, RoleBoundDb, session pooler |
| Debug an error | references/debug.md | any structured error envelope (code, severity, why, fix, nextActions, meta), emit failed, query won't typecheck, query crashed, migration won't apply, MIGRATION.HASH_MISMATCH, MIGRATION.RUNNER_FAILED, BUDGET.ROWS_EXCEEDED, BUDGET.TIME_EXCEEDED, RUNTIME.ABORTED, RUNTIME.TEMPORAL_UNAVAILABLE, PLAN.HASH_MISMATCH, CONTRACT.MARKER_MISSING, CONFIG.* / CLI.* / CONTRACT.* / MIGRATION.* / ORM.* / RUNTIME.* codes, legacy PN-* codes, exit code 4 findings, drift, capability missing, planner conflict, EXPLAIN, query log, script won't exit / close connection |
| Upgrade Prisma in an app | references/upgrade-app.md | "upgrade Prisma", "upgrade Prisma 8", "bump Prisma 8", "move to Prisma 8 X.Y", @internal/* version bump in an application, per-transition upgrade instructions in upgrading/app/upgrades/, extension-pin pre-flight, PN-UPGRADE-* |
| Upgrade Prisma in an extension | references/upgrade-extension.md | the same request in a package that is a Prisma extension (@internal/contract / SPI dependency, ^@.*/extension- name), prisma-8-check-pins, exact-pin rule, per-transition instructions in upgrading/extension/upgrades/ |
| File feedback / ask the team | references/feedback.md | bug report, file an issue, feature request, missing feature, capability gap, "this is broken", surprising behaviour, Q&A / design discussion, ask the Prisma team, Prisma Discord (pris.ly/discord), extension-author questions |