Prisma 8
Prisma 8 is the next major version of Prisma ORM, with a TypeScript runtime, contract-based data models, a new query API, and a revised migration workflow.
Prisma 8 rewrites Prisma ORM in TypeScript. The schema-first workflow and model-first queries from earlier versions stay. What changes is what your schema produces and how queries run. This page gives you the mental model, and the quickstart gets you to a running query.
Prisma 8 is the current release of Prisma ORM. Prisma 7 remains fully supported; its docs live at /orm/v7 and its setup paths at /v7/getting-started.
Your schema becomes a contract
You still author models in a Prisma schema file (or in TypeScript), but instead of generating a client package, Prisma 8 emits the schema as a contract: a JSON document plus TypeScript types that your application, the migration tools, and coding agents all read. The contract is a plain artifact you can inspect and diff.
The workflow has three steps:
- Author your schema: define your models in a Prisma schema (
.prisma) or directly in TypeScript. - Emit the contract: a lightweight build step turns the schema into a deterministic JSON contract plus TypeScript types.
- Query with a composable DSL: write queries inline against the typed contract. Each query compiles to a verifiable plan at runtime, with no hidden client methods.
What changed for developers
- Better queries: simpler nested queries, custom collection methods on your models, streaming results, and a low-level type-safe SQL builder when you need raw control.
- Extensible by design: a minimal core exposed through a public SPI. Everything around it, including Postgres support itself, is an extension, so you can add databases, query builders, data types, and middleware.
- Rethought migrations: graph-based migrations that resolve branch conflicts automatically and make partial failures safe to retry, with both schema and data migrations written in TypeScript and validated against your contract.
- AI-agent friendly: the contract is machine-readable and each query produces an inspectable plan, which gives coding agents something concrete to check their work against. The installers also register agent skills for your editor's AI assistant.
Supported databases
Prisma 8 ships first-class support for PostgreSQL (the primary target) and MongoDB. SQLite support is planned next, then MySQL.
Get started
Scaffold a new project in one command:
bunx create-prisma@latestQuickstart with PostgreSQL
Scaffold a Prisma 8 app with PostgreSQL, seed it, and run your first query.
Add to an existing project
Add Prisma 8 to an existing app with the orm init command.
The full stack path
Prisma 8 with Prisma Postgres and a Prisma Compute deploy, with guide and agent options.
Go deeper
Learn the fundamentals
Read, write, and relate data with the ORM, run transactions, and reach for advanced queries when you need them.
The data contract
Learn how your schema becomes a verifiable contract, authored in PSL or TypeScript.
CLI reference
The contract, database, and migration commands in the Prisma 8 CLI.
See your migrations in Studio
Read your applied migration history in Prisma Studio: a visual diff, the executed SQL, and a schema diff per migration.
Deploy the application
Deploy your Prisma 8 app to Prisma Compute, next to your Prisma Postgres database.
Learn more about the design of Prisma 8
The thinking behind Prisma 8 is documented on the Prisma blog. Start with these:
- The Next Evolution of Prisma ORM: why Prisma is being rebuilt, with a tour of the new query API, extensibility model, migrations, and AI-friendly design.
- Rethinking Database Migrations: how graph-based migrations replace timestamp ordering with schema state hashes.
- Prisma 8 Is ~90% As Fast as Raw PG: benchmarks against the raw PostgreSQL driver.
The full series also covers TypeScript migrations, data migrations, the extension API, the roadmap, and the early-access launch. The source lives on GitHub.
