# Prisma Next – data contracts, migration graphs, agent DX

Hey I'm Will from the Prisma team, engineering manager and also the lead developer on Prisma Next. I'd like to introduce you all to the next version of Prisma: a full rewrite in TypeScript that builds on the established patterns in Prisma and comes with a family of skills that integrate it into wha…

- **Page:** https://magpie.gallery/i/prisma-next-data-contracts-migration-graphs-agent-zav7
- **Type:** Link to an idea elsewhere
- **Category:** AI & dev
- **Tags:** orm, typescript, database, migrations, prisma

## Source

Web · wmadden: Prisma Next – data contracts, migration graphs, agent DX

- **Original:** https://news.ycombinator.com/item?id=48236762

> Hey I'm Will from the Prisma team, engineering manager and also the lead developer on Prisma Next. I'd like to introduce you all to the next version of Prisma: a full rewrite in TypeScript that builds on the established patterns in Prisma and comes with a family of skills that integrate it into whatever AI tooling you're using in 2026. (Read the announcement on our blog here: https://pris.ly/pn-ea) The three topics in the title are brand new concepts in Prisma Next so let me give you a quick rundown. 1. Data contracts If you've used Prisma before you've seen the `schema.prisma` file. That's a contract between your application and your database: it spells out exactly what your app relies on and what your database promises to persist. Your contract drives everything in Prisma Next, like queries, migrations, error checking and correctness guarantees. It's hashed to give it an identity similar to a git commit and we use that hash to sign your DB: if the DB is signed with your contract's hash, your app knows it's compatible. 2. Migration graphs, guardrails and verifications A migration transforms your database from one contract's structure to another. That makes migrations the edges in a graph of data contracts. In Prisma Next we don't store migrations as a sequence of alphabetically ordered SQL files that break the second you merge two branches together. Instead, we store them as a graph, similar to how git stores your filesystem changes as a graph of commits. And we don't store migrations as black box SQL files. Each migration's on-disk structure is an `ops.json` file with a reviewable TypeScript file alongside it. Each operation has a precheck (verifies preconditions before executing) and a postcheck (verifies successful execution and provides idempotency). The migration promises to move you from contract A to contract B, and the resulting schema is verified against the destination contract before the migration is committed. They're the safest migrations you'll ever w

## GitHub projects

- https://github.com/prisma/prisma-next

## Rules for reuse

- Build your own version: don't copy another product's code, look, icons, colours or copy.
- The original belongs to its author; Magpie only links to it.
- The original content's copyright belongs to its creator. Magpie doesn't download or re-upload it; we only show the link and the official preview.
