# Prisma 8 (/docs/orm)

> For the complete Prisma documentation index, see [llms.txt](https://www.prisma.io/docs/llms.txt). A markdown version of any docs page is available by appending `.md` to its URL.

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.

Location: Prisma 8

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](https://www.prisma.io/docs/prisma-orm/quickstart/postgresql) gets you to a running query.

> [!NOTE]
> Using Prisma 7?
> 
> Prisma 8 is the current release of Prisma ORM. Prisma 7 remains fully supported; its docs live at [/orm/v7](https://www.prisma.io/docs/orm/v7) and its setup paths at [/v7/getting-started](https://www.prisma.io/docs/v7/getting-started).

## The central change: your schema becomes a contract [#the-central-change-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:

1. **Author your schema**: define your models in a Prisma schema (`.prisma`) or directly in TypeScript.
2. **Emit the contract**: a lightweight build step turns the schema into a deterministic JSON contract plus TypeScript types.
3. **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 [#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](https://www.prisma.io/docs/orm/migrations/the-migration-graph) 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 [#supported-databases]

Prisma 8 ships first-class support for **PostgreSQL** (the primary target) and **MongoDB**. **SQLite** support is planned next, then **MySQL**.

## Get started [#get-started]

Scaffold a new project in one command:

  

#### bun

```bash
bunx create-prisma@latest
```

#### pnpm

```bash
pnpm dlx create-prisma@latest
```

#### yarn

```bash
yarn dlx create-prisma@latest
```

#### npm

```bash
npx create-prisma@latest
```

- [Quickstart with PostgreSQL](https://www.prisma.io/docs/prisma-orm/quickstart/postgresql): Scaffold a Prisma 8 app with PostgreSQL, seed it, and run your first query.

- [Add to an existing project](https://www.prisma.io/docs/prisma-orm/add-to-existing-project/postgresql): Add Prisma 8 to an existing app with the `orm init` command.

- [The full stack path](https://www.prisma.io/docs): Prisma 8 with Prisma Postgres and a Prisma Compute deploy, with guide and agent options.

## Go deeper [#go-deeper]

- [Learn the fundamentals](https://www.prisma.io/docs/orm/fundamentals/reading-data): Read, write, and relate data with the ORM, run transactions, and reach for advanced queries when you need them.

- [The data contract](https://www.prisma.io/docs/orm/contract-authoring/the-data-contract): Learn how your schema becomes a verifiable contract, authored in PSL or TypeScript.

- [CLI reference](https://www.prisma.io/docs/cli): The contract, database, and migration commands in the Prisma 8 CLI.

- [See your migrations in Studio](https://www.prisma.io/docs/studio/prisma-next): Read your applied migration history in Prisma Studio: a visual diff, the executed SQL, and a schema diff per migration.

- [Deploy the application](https://www.prisma.io/docs/prisma-compute/deploy): Ready to ship? Deploy your Prisma 8 app to Prisma Compute, next to your Prisma Postgres database.

## Learn more about the design of Prisma 8 [#learn-more-about-the-design-of-prisma-8]

The thinking behind Prisma 8 is documented on the [Prisma blog](https://www.prisma.io/blog). Start with these:

* **[The Next Evolution of Prisma ORM](https://www.prisma.io/blog/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](https://www.prisma.io/blog/rethinking-database-migrations)**: how graph-based migrations replace timestamp ordering with schema state hashes.
* **[Prisma 8 Is \~90% As Fast as Raw PG](https://www.prisma.io/blog/prisma-next-performance-benchmark)**: benchmarks against the raw PostgreSQL driver.

The full series also covers [TypeScript migrations](https://www.prisma.io/blog/typescript-migrations-in-prisma-next), [data migrations](https://www.prisma.io/blog/data-migrations-in-prisma-next), [the extension API](https://www.prisma.io/blog/prisma-next-call-for-extension-authors), the [roadmap](https://www.prisma.io/blog/prisma-next-roadmap), and the [early-access launch](https://www.prisma.io/blog/prisma-next-early-access-write-your-contract-prompt-your-agent-ship-your-app). The source lives on [GitHub](https://github.com/prisma/prisma).

## Related pages

- [`Build faster with Prisma + AI`](https://www.prisma.io/docs/ai): Build faster with Prisma and AI coding tools like Cursor, Codex, and ChatGPT
- [`Choose a Prisma 8 setup path`](https://www.prisma.io/docs/getting-started): Choose the fastest path to try Prisma 8 in a new or existing project.
- [`Console`](https://www.prisma.io/docs/console): Learn how to use the Console to manage and integrate Prisma products into your application.
- [`Deploy the full Prisma stack`](https://www.prisma.io/docs/full-stack-tutorial): A single tutorial from empty directory to live URL, with Prisma Composer, Prisma 8, and Prisma Postgres.
- [`Introduction to Prisma 8`](https://www.prisma.io/docs/prisma-orm): Prisma 8 is the current release of Prisma ORM.