# Prisma Documentation - Prisma Next (Early Access) > Prisma Next, the next major version of Prisma ORM, available in Early Access. A ground-up TypeScript rewrite that keeps the schema-first workflow while making it extensible, composable, and AI-agent friendly. Covers setup, ORM, guides, and CLI docs for Prisma Next. - [`Advanced queries`](https://www.prisma.io/docs/orm/next/fundamentals/advanced-queries): Use the SQL query builder on PostgreSQL and the pipeline builder on MongoDB for queries the ORM API can't express. - [`Applying a migration`](https://www.prisma.io/docs/orm/next/migrations/applying-a-migration): prisma-next migrate walks the graph from where your database is to where you want it, with a preview, a checkpoint at every step, and safe retries. - [`Astro`](https://www.prisma.io/docs/guides/next/frameworks/astro): Set up Prisma Next in an Astro app with create-prisma, from scaffold to rendered data, and deploy it to Prisma Compute. - [`Author in PSL`](https://www.prisma.io/docs/orm/next/contract-authoring/psl-syntax): Write the Prisma Next contract as a Prisma schema file, using the schema language you already know plus the Prisma Next additions. - [`Author in TypeScript`](https://www.prisma.io/docs/orm/next/contract-authoring/typescript-schema-builder): Define the Prisma Next contract with a typed builder API instead of a schema file. Same models, same artifacts, no separate language. - [`Authoring custom middleware`](https://www.prisma.io/docs/orm/next/middleware/authoring-custom-middleware): Build, register, and run your own Prisma Next middleware, step by step, starting with a query logger. - [`Build and deploy the full Prisma stack`](https://www.prisma.io/docs/next/full-stack-tutorial): A single tutorial from empty directory to live URL, with Prisma Next, Prisma Postgres, and Prisma Compute. - [`Built-in: budgets`](https://www.prisma.io/docs/orm/next/middleware/built-in-budgets): The budgets middleware caps row counts and makes over-latency queries visible. - [`Built-in: cache`](https://www.prisma.io/docs/orm/next/middleware/built-in-cache): The cache middleware serves repeated reads from an in-memory store, opted in per query with a cache annotation. - [`Built-in: lints`](https://www.prisma.io/docs/orm/next/middleware/built-in-lints): The lints middleware inspects each query's structure before it runs and blocks or warns on risky shapes. - [`Bun`](https://www.prisma.io/docs/guides/next/runtimes/bun): Scaffold a Prisma Next app with Bun, run your first typed query, serve users over HTTP, and deploy to Prisma Compute. - [`Capabilities`](https://www.prisma.io/docs/orm/next/contract-authoring/capabilities): Capabilities record what your database stack supports, so Prisma Next can reject unsupported features early with a clear error. - [`Choose a Prisma Next setup path`](https://www.prisma.io/docs/next/getting-started): Choose the fastest path to try Prisma Next in a new or existing project. - [`CLI configuration`](https://www.prisma.io/docs/cli/next/configuration): Configure Prisma Next CLI commands with prisma-next.config.ts and global flags. - [`Deno`](https://www.prisma.io/docs/guides/next/runtimes/deno): Run Prisma Next on Deno, including the import-extension and permission differences that matter. - [`Editing a migration`](https://www.prisma.io/docs/orm/next/migrations/editing-a-migration): A migration is TypeScript you own. Fill in backfills, reorder steps, or drop to raw SQL, then recompile it with one command. - [`Elysia`](https://www.prisma.io/docs/guides/next/frameworks/elysia): Build an Elysia API on Prisma Next with the elysia template and deploy it to Prisma Compute. - [`Error reference`](https://www.prisma.io/docs/orm/next/reference/error-reference): Every structured error code Prisma Next can emit, by namespace, with the condition that raises it. - [`From the CLI`](https://www.prisma.io/docs/next/prisma-postgres/from-the-cli): Start a Prisma Next app with Prisma Postgres from the command line. - [`Generating a migration`](https://www.prisma.io/docs/orm/next/migrations/generating-a-migration): Turn a contract change into a reviewable migration with prisma-next migration plan. - [`Hono`](https://www.prisma.io/docs/guides/next/frameworks/hono): Build a Hono API on Prisma Next with the hono template, add your own routes, and deploy it to Prisma Compute. - [`How middleware works`](https://www.prisma.io/docs/orm/next/middleware/how-middleware-works): Middleware runs your code before and after every query, so one policy can cover your whole app. - [`How migrations work`](https://www.prisma.io/docs/orm/next/migrations/how-migrations-work): Change your contract, plan a migration, review it, apply it. Every step is checked before and after it runs. - [`Import from MySQL`](https://www.prisma.io/docs/next/prisma-postgres/import-from-existing-database-mysql): Import an existing MySQL database into Prisma Postgres, then use it with Prisma Next. - [`Import from PostgreSQL`](https://www.prisma.io/docs/next/prisma-postgres/import-from-existing-database-postgresql): Import an existing PostgreSQL database into Prisma Postgres, then use it with Prisma Next. - [`Introduction to Prisma Next`](https://www.prisma.io/docs/next): Prisma Next is the next major version of Prisma ORM, available in Early Access. - [`MongoDB`](https://www.prisma.io/docs/next/add-to-existing-project/mongodb): Add Prisma Next to an existing MongoDB project. - [`MongoDB`](https://www.prisma.io/docs/next/quickstart/mongodb): Create a new Prisma Next project with MongoDB using create-prisma@next. - [`MongoDB`](https://www.prisma.io/docs/guides/next/upgrade-prisma-orm/mongodb): Migrate a MongoDB project from Prisma v6 to Prisma Next - [`MongoDB data modeling`](https://www.prisma.io/docs/orm/next/data-modeling/mongodb): Model documents, embedded documents, and references for MongoDB, and decide when to embed and when to reference. - [`NestJS`](https://www.prisma.io/docs/guides/next/frameworks/nestjs): Set up Prisma Next in a NestJS app with create-prisma, from scaffold to seeded API to a live deploy on Prisma Compute. - [`Next.js`](https://www.prisma.io/docs/guides/next/frameworks/nextjs): Set up Prisma Next in a Next.js app with create-prisma, from scaffold to rendered data, and deploy it to Prisma Compute. - [`Nuxt`](https://www.prisma.io/docs/guides/next/frameworks/nuxt): Set up Prisma Next in a Nuxt app with create-prisma, from scaffold to rendered data, and deploy it to Prisma Compute. - [`ORM client reference`](https://www.prisma.io/docs/orm/next/reference/orm-client): Reference for the Prisma Next ORM client's query, mutation, filter, and aggregate methods. - [`Overview`](https://www.prisma.io/docs/guides/next): Practical, step-by-step guides for building with Prisma Next, each one run end to end before it ships. - [`Overview`](https://www.prisma.io/docs/orm/next/data-modeling): Describe the data your application needs with models, primary keys, scalar fields, and relations. - [`Pipeline builder reference`](https://www.prisma.io/docs/orm/next/reference/pipeline-builder): Reference for the Prisma Next MongoDB pipeline builder's stages, accumulators, expression helpers, and write terminals. - [`PostgreSQL`](https://www.prisma.io/docs/next/add-to-existing-project/postgresql): Add Prisma Next to an existing PostgreSQL project. - [`PostgreSQL`](https://www.prisma.io/docs/next/quickstart/postgresql): Create a new Prisma Next project with PostgreSQL using create-prisma@next. - [`Prisma Next`](https://www.prisma.io/docs/orm/next): A look at Prisma Next, a ground-up rethink of Prisma that improves queries, extensibility, migrations, and AI-friendly workflows while keeping Prisma’s schema-first approach. - [`Prisma Next API reference`](https://www.prisma.io/docs/orm/next/reference): Reference index for the Prisma Next ORM client, SQL query builder, pipeline builder, raw queries, and runtime APIs. - [`Prisma Next CLI`](https://www.prisma.io/docs/cli/next): Reference for the Prisma Next command line interface. - [`prisma-next contract emit`](https://www.prisma.io/docs/cli/next/contract-emit): Emit Prisma Next contract artifacts. - [`prisma-next contract infer`](https://www.prisma.io/docs/cli/next/contract-infer): Infer a starter contract from an existing database. - [`prisma-next db init`](https://www.prisma.io/docs/cli/next/db-init): Initialize a database from the current Prisma Next contract. - [`prisma-next db schema`](https://www.prisma.io/docs/cli/next/db-schema): Inspect a live database schema. - [`prisma-next db sign`](https://www.prisma.io/docs/cli/next/db-sign): Sign a database with the current Prisma Next contract. - [`prisma-next db update`](https://www.prisma.io/docs/cli/next/db-update): Update a database to match the current Prisma Next contract. - [`prisma-next db verify`](https://www.prisma.io/docs/cli/next/db-verify): Verify a database against the current Prisma Next contract. - [`prisma-next init`](https://www.prisma.io/docs/cli/next/init): Initialize Prisma Next files in a project. - [`prisma-next migration apply`](https://www.prisma.io/docs/cli/next/migration-apply): Apply pending Prisma Next migrations. - [`prisma-next migration new`](https://www.prisma.io/docs/cli/next/migration-new): Scaffold a Prisma Next migration package for manual authoring. - [`prisma-next migration plan`](https://www.prisma.io/docs/cli/next/migration-plan): Plan an on-disk migration from Prisma Next contract changes. - [`prisma-next migration ref`](https://www.prisma.io/docs/cli/next/migration-ref): Manage named Prisma Next migration refs. - [`prisma-next migration show`](https://www.prisma.io/docs/cli/next/migration-show): Inspect a Prisma Next migration package. - [`prisma-next migration status`](https://www.prisma.io/docs/cli/next/migration-status): Show Prisma Next migration history and applied state. - [`Raw queries reference`](https://www.prisma.io/docs/orm/next/reference/raw-queries): Reference for Prisma Next raw query escape hatches: PostgreSQL raw SQL and MongoDB raw commands. - [`Reading data`](https://www.prisma.io/docs/orm/next/fundamentals/reading-data): Fetch one record or many with Prisma Next, then filter, select, sort, paginate, and stream the results. - [`Relational data modeling`](https://www.prisma.io/docs/orm/next/data-modeling/relational-databases): Model one-to-one, one-to-many, many-to-many, and polymorphic relations for PostgreSQL and other SQL databases. - [`Relations and joins`](https://www.prisma.io/docs/orm/next/fundamentals/relations-and-joins): Read related records in one query with .include(), and understand how one-to-one, one-to-many, and many-to-many relationships work. - [`Rollbacks and recovery`](https://www.prisma.io/docs/orm/next/migrations/rollbacks-and-recovery): Rolling back is planning one more migration to a state you've already been in. Recovery is fixing the cause and re-running, safely. - [`SQL query builder reference`](https://www.prisma.io/docs/orm/next/reference/sql-query-builder): Reference for the Prisma Next SQL query builder's select, mutation, and grouped query methods. - [`SvelteKit`](https://www.prisma.io/docs/guides/next/frameworks/sveltekit): Set up Prisma Next in a SvelteKit app with create-prisma, from scaffold to rendered data. - [`TanStack Start`](https://www.prisma.io/docs/guides/next/frameworks/tanstack-start): Set up Prisma Next in a TanStack Start app with create-prisma, from scaffold to rendered data, and deploy it to Prisma Compute. - [`The data contract`](https://www.prisma.io/docs/orm/next/contract-authoring/the-data-contract): The data contract is the single description of your data model and its storage layout. Everything in Prisma Next is typed, planned, and verified against it. - [`The emitted artifacts`](https://www.prisma.io/docs/orm/next/contract-authoring/the-contract-artifact): contract.json and contract.d.ts are the deterministic artifacts every other part of Prisma Next consumes. Here is what is inside them. - [`The migration graph`](https://www.prisma.io/docs/orm/next/migrations/the-migration-graph): You changed your schema, a teammate changed theirs, both merged. The migration graph is what lets every database catch up without renaming files or rebuilding history. - [`Transactions`](https://www.prisma.io/docs/orm/next/fundamentals/transactions): Run several writes so they all succeed or all fail together with db.transaction(). - [`Transactions and runtime reference`](https://www.prisma.io/docs/orm/next/reference/transactions-and-runtime): Reference for the Prisma Next client lifecycle, transactions, prepared statements, and execution options. - [`Using extensions`](https://www.prisma.io/docs/orm/next/extensions/using-extensions): Extensions add database capabilities like vector search, geospatial data, and full-text search to a Prisma Next project. - [`Writing data`](https://www.prisma.io/docs/orm/next/fundamentals/writing-data): Create, update, delete, and upsert records with Prisma Next, one at a time or in bulk.