Prisma
Build, fortify, and grow your application easily with an intuitive data model, type-safety, automated migrations, connection pooling, caching, and real-time database subscriptions.
Prisma Documentation
Prisma changes frequently — verify against the changelog and current docs before implementing. Do not rely on training data for Prisma features. APIs, configuration, and conventions can change between versions.
First, fetch https://www.prisma.io/changelog.md to check for recent or relevant breaking changes, then look up the relevant topic in the documentation below.
This documentation covers the current docs plus legacy v6 pages. Prefer the Latest ORM section for current recommendations. v6 pages are maintained for backwards compatibility only.
Common Queries
Check the Prisma changelog for recent changes: Prisma changes frequently. Fetch this machine-readable changelog before implementing any Prisma feature to check for breaking changes, API updates, or new conventions.Start a new Prisma ORM project: Set up Prisma ORM, Prisma Client, and Prisma Postgres in a new TypeScript app.Connect to Prisma Postgres: Choose the right connection string for Prisma ORM, PostgreSQL tools, and serverless runtimes.Run Prisma Postgres locally: Use local Prisma Postgres during development and switch to a hosted database for production.Manage database connections: Configure Prisma Client connection management for long-running and serverless apps.Create and apply migrations: Use Prisma Migrate to evolve your database schema in development.Deploy migrations safely: Apply schema changes in production with Prisma Migrate.Use Query Insights: Inspect slow queries, connect Prisma calls to SQL, and apply focused fixes.Set up the Prisma MCP server: Connect AI agents to Prisma Postgres workflows with the local or remote MCP server.Use the Prisma Client API: Look up Prisma Client query APIs, options, and generated types.Use the Prisma CLI: Look up Prisma CLI commands for init, generate, migrate, db, and studio workflows.Troubleshoot Prisma ORM errors: Find common Prisma ORM errors and links to deeper troubleshooting pages.Troubleshoot Prisma Postgres: Resolve common Prisma Postgres issues.Review pricing: Compare Prisma plans and pricing for Prisma Postgres and Prisma platform features.Use Prisma Postgres with Next.js: Set up Prisma ORM and Prisma Postgres in a Next.js app with App Router.Use Prisma Postgres with SvelteKit: Set up Prisma ORM and Prisma Postgres in a SvelteKit application.Use Prisma Postgres with Nuxt: Set up Prisma ORM and Prisma Postgres in a Nuxt application.Use Prisma Postgres with Hono on Cloudflare Workers: Set up Prisma ORM and Prisma Postgres in a Hono app deployed to Cloudflare Workers.
Product Area Indexes
Prisma ORM: Prisma ORM setup, schema modeling, Prisma Client, migrations, and references.Prisma Postgres: Prisma Postgres setup, connection strings, local development, operations, and guides.Query Insights: Query performance analysis, slow query inspection, and Prisma SQL comment setup.Prisma MCP: MCP server setup for Prisma Postgres and Prisma CLI workflows.
Latest
- ``client
: Add methods to Prisma Client: Extend the functionality of Prisma Client, client component - ``model
: Add custom methods to your models: Extend the functionality of Prisma Client, model component - ``query
: Create custom Prisma Client queries: Extend the functionality of Prisma Client, query component - ``result
: Add custom fields and methods to query results: Extend the functionality of Prisma Client, result component About migration histories: About migration historiesAbout the shadow database: Learn how Prisma Migrate uses shadow databases to detect schema driftAbout the shadow database: About the shadow databaseAdd custom fields and methods to query results: Extend the functionality of Prisma Client, result componentAdd custom methods to your models: Extend the functionality of Prisma Client, model componentAdd methods to Prisma Client: Extend the functionality of Prisma Client, client componentAgent Skills: Give your AI coding agent up-to-date Prisma knowledge with installable skillsAggregation, grouping, and summarizing: Use Prisma Client to aggregate, group by, count, and select distinct.Aggregation, grouping, and summarizing: Use Prisma Client to aggregate, group by, count, and select distinct.AI SDK (with Next.js): Build a chat application with AI SDK, Prisma, and Next.js to store chat sessions and messagesAlchemy: Provision and manage Prisma Postgres projects, databases, and connections with Alchemy.API patterns: How to use Prisma ORM with REST APIs, GraphQL servers, and fullstack frameworksAstro: Learn how to use Prisma ORM in an Astro appAstro + Prisma: Step-by-step guide for integrating Prisma ORM and Prisma Postgres in an Astro.js projectAuth.js (with Next.js): Learn how to use Prisma ORM in a Next.js app with Auth.jsAuthentication: Learn how to authenticate with the Prisma Management API using service tokens or OAuth 2.0Backups: Manage and restore database backups in Prisma PostgresBaselining a database: How to initialize a migration history for an existing database that contains important data.Baselining a database: How to initialize a migration history for an existing database that contains important data.Best Postgres for AI apps: Why Prisma Postgres works well for AI and LLM workloads — built-in pooling, query caching, edge connectivity, pgvector, and MCP support.Best practices: Learn production-ready patterns for schema design, query optimization, type safety, security, and deployment with Prisma ORM.Better Auth (with Astro): Learn how to use Prisma ORM in an Astro app with Better AuthBetter Auth (with Next.js): Learn how to use Prisma ORM in a Next.js app with Better AuthBuild a Tweet SaaS with Next.js, Prisma Postgres, and Ollama: A complete vibe coding tutorial: build a tweet polishing app from scratch using Next.js, Prisma ORM, Prisma Postgres, UploadThing, and a local LLM with Ollama.Build faster with Prisma + AI: Build faster with Prisma and AI coding tools like Cursor, Codex, and ChatGPTBun: Learn how to use Prisma ORM in a Bun application with Prisma PostgresBun workspaces: Learn step-by-step how to integrate Prisma ORM in a Bun workspaces monorepo to build scalable and modular applications efficientlyBundler issues: Solve ENOENT package error with vercel/pkg and other bundlersBundler issues: Solve ENOENT package error with vercel/pkg and other bundlersCase sensitivity: How Prisma Client handles case sensitivity when filtering and sorting.Caveats when deploying to AWS platforms: Known caveats when deploying to an AWS platformCaveats when deploying to AWS platforms: Known caveats when deploying to an AWS platformChatGPT: Learn how to add the Prisma MCP server to ChatGPT to manage your Prisma Postgres databasesChatGPT: Learn how to add the remote Prisma MCP server to ChatGPT to manage your Prisma Postgres databases.Check constraints: Learn how to configure CHECK constraints for data validation with Prisma ORM and PostgreSQLCheck constraints: Learn how to configure CHECK constraints for data validation with Prisma ORM and PostgreSQL.Choose a setup path: Choose the fastest path to start using Prisma ORM or Prisma Postgres in a new or existing project.Clerk (with Astro): Learn how to use Prisma ORM in an Astro app with Clerk AuthClerk (with Next.js): Learn how to use Prisma ORM in a Next.js app with Clerk AuthCLI Overview: The Prisma CLI is the command-line interface for Prisma ORM. Use it to initialize projects, generate Prisma Client, manage databases, run migrations, and moreCloudflare D1: Learn how to use Prisma ORM with Cloudflare D1Cloudflare D1: Guide to Cloudflare D1Cloudflare Workers: Learn how to use Prisma ORM and Prisma Postgres in a Cloudflare Workers projectCockroachDB: Add Prisma ORM to an existing TypeScript project with CockroachDB and learn database introspection, baselining, and queryingCockroachDB: Create a new TypeScript project from scratch by connecting Prisma ORM to CockroachDB and generating a Prisma Client for database accessCockroachDB: Guide to CockroachDBCodex: Learn how to install the Prisma Codex plugin and use Prisma MCP from CodexComposite types: Work with composite types and embedded documents in MongoDBComposite types: Learn about composite types in Prisma Client for MongoDBComputed fields: This page explains how to use client extensions to add computed fields to Prisma models.Concepts: Understand the core concepts of the Prisma Console: user accounts, workspaces, projects, and resourcesConfig API: Complete reference for prisma.config.ts configuration optionsConfigure Prisma Client with PgBouncer: Configure Prisma Client with PgBouncer and other poolers: when to use pgbouncer=true, required transaction mode, prepared statements, and Prisma Migrate workaroundsConfigure Prisma Client with PgBouncer: Configure Prisma Client with PgBouncer and other poolers: when to use pgbouncer=true, required transaction mode, prepared statements, and Prisma Migrate workarounds.Configuring error formatting: This page explains how to configure the formatting of errors when using Prisma ClientConfiguring error formatting: This page explains how to configure the formatting of errors when using Prisma Client.Connecting to your database: Choose the right Prisma Postgres connection string for your runtime, tool, and workload.Connection management: This page explains how database connections are handled with Prisma Client and how to manually connect and disconnect your databaseConnection management: This page explains how database connections are handled with Prisma Client and how to manually connect and disconnect your database.Connection pool: Prisma Client uses a connection pool (from the database driver or driver adapter) to store and manage database connections.Connection pool: Prisma ORM's query engine creates a connection pool to store and manage database connections.Connection pooling: Use Prisma Postgres connection pooling for concurrent application traffic.Connection URLs: Learn about the format and syntax Prisma ORM uses for defining database connection URLs for PostgreSQL, MySQL and SQLiteConnection URLs: Learn about the format and syntax Prisma ORM uses for defining database connection URLs for PostgreSQL, MySQL and SQLite.Console: Learn how to use the Console to manage and integrate Prisma products into your application.Create connection: Creates a new connection for the specified database.Create custom Prisma Client queries: Extend the functionality of Prisma Client, query componentCreate database: Creates a new database in the specified project.Create database: Creates a new database for the given project.Create database connection string: Creates a new connection string for the given database.Create project with a postgres database: Creates a new project with a postgres database.create-db: Learn how to provision temporary Prisma Postgres databases with create-dbCRUD: Learn how to perform create, read, update, and delete operationsCRUD: How to perform CRUD with Prisma Client.Cursor: Learn tips and best practices for using Prisma ORM with the Cursor AI code editorCursor: Learn tips and best practices for using Prisma ORM with the Cursor AI code editor.Custom model and field names: Learn how you can decouple the naming of Prisma models from database tables to improve the ergonomics of the generated Prisma Client APICustom model and field names: Learn how you can decouple the naming of Prisma models from database tables to improve the ergonomics of the generated Prisma Client API.Custom models: This page explains how to wrap Prisma Client in custom modelsCustom validation: This page explains how to add custom validation to Prisma ClientCustomizing migrations: How to edit a migration file before applying it to avoid data loss in production.Customizing migrations: How to edit a migration file before applying it to avoid data loss in production.Data migrations: How to migrate data using Prisma ORM with the expand and contract pattern.Data modeling: Learn how data modeling with Prisma differs from data modeling with SQL or ORMs. Prisma uses a declarative data modeling language to describe a database schemaData modeling: Learn how data modeling with Prisma differs from data modeling with SQL or ORMs. Prisma uses a declarative data modeling language to describe a database schema.Data sources: Data sources enable Prisma to connect to your database. This page explains how to configure data sources in your Prisma schemaData sources: Data sources enable Prisma to connect to your database. This page explains how to configure data sources in your Prisma schema.Database: Overview of Prisma Postgres database operations, connections, pooling, backups, and query analysis.Database connections: Learn how to manage database connections and configure connection poolsDatabase connections: Databases connectionsDatabase drivers: Learn how Prisma connects to your database using driver adaptersDatabase drivers: Learn how Prisma connects to your database using the built-in drivers and how you can use Prisma along with other JavaScript database drivers using driver adapters (Preview)Database Features: Database features supported in Prisma ORMDatabase features matrix: Learn which database features are supported in Prisma ORM and how they map to the different Prisma ORM tools.Database mapping: Learn how to map model and field names to database tables and columnsDatabase mapping: Database mapping in Prisma schemaDatabase Metrics: Monitor your database performance with Console metricsDatabase polyfills: Prisma Client provides features that are not achievable with relational databases. These features are referred to as "polyfills" and explained on this page.Database polyfills: Prisma Client provides features that are not achievable with relational databases. These features are referred to as "polyfills" and explained on this page.Datadog: Learn how to configure Datadog tracing for a Prisma ORM project. Capture spans for every query using the @prisma/instrumentation package, dd-trace, and view them in Datadogdb: Manage your database schema and lifecycle during developmentdebug: Display Prisma debug information including schema paths, engine binaries, environment variables, and cache directories for troubleshootingDebugging: This page explains how to enable debugging output for Prisma Client by setting theDEBUGenvironment variableDebugging: This page explains how to enable debugging output for Prisma Client by setting theDEBUGenvironment variable.Delete connection: Deletes the connection with the given ID.Delete database: Deletes the database with the given ID.Delete integration: Revokes the integration tokens by integration ID.Delete project: Deletes the project with the given ID.Deno: Learn how to use Prisma ORM in a Deno application with Prisma Postgresdeploy: Apply pending migrations to update the database schema in production/stagingDeploy migrations from a local environment: Learn how to deploy Node.js and TypeScript applications that are using Prisma Client locallyDeploy migrations from a local environment: Learn how to deploy Node.js and TypeScript applications that are using Prisma Client locally.Deploy Prisma ORM: Learn more about the different deployment paradigms for Node.js applications and how they affect deploying an application using Prisma ClientDeploy Prisma ORM: Learn more about the different deployment paradigms for Node.js applications and how they affect deploying an application using Prisma Client.Deploy to a different OS: Learn how to deploy Node.js and TypeScript applications that are using Prisma Client to a different operating system.Deploy to AWS Lambda: Learn how to deploy your Prisma ORM-backed applications to AWS Lambda with AWS SAM, Serverless Framework, or SSTDeploy to AWS Lambda: Learn how to deploy your Prisma ORM-backed applications to AWS Lambda with AWS SAM, Serverless Framework, or SSTDeploy to Azure Functions: Learn how to deploy a Prisma Client based REST API to Azure Functions and connect to an Azure SQL databaseDeploy to Azure Functions: Learn how to deploy a Prisma Client based REST API to Azure Functions and connect to an Azure SQL databaseDeploy to Cloudflare Workers & Pages: Learn the things you need to know in order to deploy an app that uses Prisma Client for talking to a database to a Cloudflare Worker or to Cloudflare PagesDeploy to Cloudflare Workers & Pages: Learn the things you need to know in order to deploy an app that uses Prisma Client for talking to a database to a Cloudflare Worker or to Cloudflare Pages.Deploy to Deno Deploy:Deploy to Deno Deploy: Learn how to deploy a TypeScript application to Deno Deploy.Deploy to Fly.io: Learn how to deploy a Node.js server that uses Prisma ORM to Fly.ioDeploy to Fly.io: Learn how to deploy a Node.js server that uses Prisma ORM to Fly.io.Deploy to Heroku: Learn how to deploy a Node.js server that uses Prisma ORM to HerokuDeploy to Heroku: Learn how to deploy a Node.js server that uses Prisma ORM to Heroku.Deploy to Koyeb: Learn how to deploy a Node.js server that uses Prisma ORM to Koyeb Serverless PlatformDeploy to Koyeb: Learn how to deploy a Node.js server that uses Prisma ORM to Koyeb Serverless Platform.Deploy to Netlify: Learn how to deploy Node.js and TypeScript applications that are using Prisma Client to NetlifyDeploy to Netlify: Learn how to deploy Node.js and TypeScript applications that are using Prisma Client to Netlify.Deploy to Railway: Learn how to deploy an app that uses Prisma ORM and Prisma Postgres to RailwayDeploy to Railway: Learn how to deploy an app that uses Prisma ORM and Prisma Postgres to Railway.Deploy to Render: Learn how to deploy a Node.js server that uses Prisma ORM to RenderDeploy to Render: Learn how to deploy a Node.js server that uses Prisma ORM to Render.Deploy to Sevalla: Learn how to deploy a Node.js server that uses Prisma ORM to SevallaDeploy to Sevalla: Learn how to deploy a Node.js server that uses Prisma ORM to Sevalla.Deploy to Vercel: Learn how to deploy a Next.js application based on Prisma Client to VercelDeploy to Vercel: Learn how to deploy a Next.js application based on Prisma Client to Vercel.Deploy to Vercel Edge Functions & Middleware: Learn the things you need to know in order to deploy an Edge function that uses Prisma Client for talking to a databaseDeploy to Vercel Edge Functions & Middleware: Learn the things you need to know in order to deploy an Edge function that uses Prisma Client for talking to a database.Deploying database changes with Prisma Migrate: Learn how to deploy database changes with Prisma MigrateDeploying database changes with Prisma Migrate: Learn how to deploy database changes with Prisma Migrate.Deploying edge functions with Prisma ORM: Learn how to deploy your Prisma-backed apps to edge functions like Cloudflare Workers or Vercel Edge FunctionsDeploying edge functions with Prisma ORM: Learn how to deploy your Prisma-backed apps to edge functions like Cloudflare Workers or Vercel Edge Functionsdev: Start a local Prisma Postgres server for developmentdev: Create a migration from changes in Prisma schema, apply it to the database, and trigger generatorsDev environment: Set up your local Prisma ORM development environment, including editor tooling and environment variables.Development and production: How to use Prisma Migrate commands in development and production environmentsDevelopment and production: Development and productiondiff: Compare the database schema from two arbitrary sourcesDocker: Learn step-by-step configure a Prisma ORM app in DockerDrizzle: Learn how to migrate from Drizzle to Prisma ORMDrizzle: Learn how Prisma ORM compares to DrizzleDrizzle: Learn how Prisma ORM compares to Drizzle.Drizzle ORM: Get started with Drizzle ORM and Prisma PostgresEdge functions: Learn how to deploy your Prisma ORM-backed apps to edge functions like Cloudflare Workers or Vercel Edge FunctionsEditor setup: Learn how to configure your editor and IDEs for an optimal developer experience with Prisma ORMEditor setup: Learn how to configure your editor and IDEs for an optimal developer experience with Prisma ORM.Elysia: Learn how to use Prisma ORM in an Elysia appEmbed Studio: Learn how to embed Prisma Studio in your own applications to provide users with an amazing data editing experience.Embedded Prisma Studio (with Next.js): Learn how to embed Prisma Studio directly in your Next.js application for database managementEngines: Prisma's query engine manages the communication with the database when using Prisma ORM. Learn how it works on this page.Environment variables: Learn how to manage environment variables in your Prisma ORM projectEnvironment variables: Learn how to manage environment variables in your Prisma ORM projectEnvironment Variables: Reference for Prisma environment variablesEnvironment variables reference: This page gives an overview of all environment variables available for use.Error message reference: Prisma Client, Migrate, Introspection error message referenceError reference: Error reference documentation for Prisma PostgresError Reference: Prisma Client, Migrate, and Introspection error codesExcluding fields: Learn how to exclude fields from Prisma Client results with the omit option.Excluding fields: This page explains how to exclude sensitive fields from Prisma Clientexecute: Execute native commands to your databaseExpand-and-contract migrations: Learn how to perform data migrations using the expand and contract pattern with Prisma ORMExtensions: Enable and use standard PostgreSQL extensions with Prisma Postgres.Extensions: Extend the functionality of Prisma ClientExternal tables: How to declare and use externally managed tables in Prisma ORMExternal tables: How to declare and use externally managed tables in Prisma ORMFeature Maturity: Understand Early Access and Preview feature stages in the ConsoleFields & types: Learn how to use about special fields and types with Prisma ClientFields & types: Learn how to use about special fields and types with Prisma Client.Filtering and sorting: Learn how to filter Prisma Client queries with where and sort results with orderBy.Filtering and Sorting: Use Prisma Client API to filter records by any combination of fields or related record fields, and/or sort query results.Fine-Grained Authorization (Permit): Learn how to implement RBAC, ABAC, and ReBAC authorization in your Prisma applicationsFine-Grained Authorization (Permit): Learn how to implement RBAC, ABAC, and ReBAC authorization in your Prisma applicationsFirebase Studio: Learn how to use Prisma Postgres in the online Firebase StudioFly.io: Learn how to deploy applications using Prisma Postgres to Fly.ioformat: Format and validate your Prisma schema file with consistent structureFrom the CLI: Start building a Prisma application with a Prisma Postgres database from the CLIFrom v1: Upgrading your project from Prisma 1 to Prisma ORM 2 and laterFull-text search: Learn how to search text fields with Prisma Client using your database's native full-text search support.Full-text search: This page explains how to search for text within a field.Fullstack: This page gives explains how to build fullstack applications with Prisma. It shows how Prisma fits in with fullstack frameworks and provides practical examplesgenerate: Generate artifacts like Prisma Client based on your Prisma schemaGenerating down migrations: How to generate a down migration SQL file that reverses a given migration fileGenerating down migrations: How to generate down migrationsGenerating Prisma Client: Learn when and how to run prisma generate, configure the generator output, and import the generated client in your app.Generating Prisma Client: This page explains how to generate Prisma Client. It also provides additional context on the generated client, typical workflows and Node.js configuration.Generators: Generators in your Prisma schema specify what assets are generated when theprisma generatecommand is invoked. This page explains how to configure generatorsGenerators: Generators in your Prisma schema specify what assets are generated when theprisma generatecommand is invoked. This page explains how to configure generators.Get all regions: Returns all available regions across products. Optionally filter by product.Get connection: Returns the connection with the given ID.Get current authenticated principal: Returns the user, workspace, and credential represented by the current token.Get database: Returns the database with the given ID.Get database usage metrics: Returns usage metrics for the specified database.Get integration by ID: Returns a single integration by its ID.Get list of backups: Returns backups for the specified database.Get list of database connections: Returns all connections for the given database.Get list of databases: Returns databases for the given project.Get list of integrations: Returns integrations filtered by workspace ID.Get list of integrations: Returns integrations for the given workspace.Get list of projects: Returns the list of projects the token has access to.Get list of workspaces: Returns the list of workspaces the current token can access.Get Prisma Postgres regions: Returns all available regions for Prisma Postgres.Get project: Returns the project with the given ID.Get workspace: Returns the workspace with the given ID.Getting Started: Quick start guide for setting up and using the Prisma ConsoleGetting Started: Get started with the Prisma Management API by creating your first project and databaseGetting Started: Learn how to set up and use Prisma Studio to manage your databaseGetting started with Prisma Migrate: Learn how to migrate your schema in a development environment using Prisma MigrateGetting started with Prisma Migrate: Learn how to migrate your schema in a development environment using Prisma Migrate.GitHub Actions: Provision and manage Prisma Postgres databases per pull request using GitHub Actions and Prisma Management APIGitHub Copilot: Learn about the features available with GitHub Copilot and Prisma ORM, plus best practices and tipsGitHub Copilot: Learn about the features available with GitHub Copilot and Prisma ORM, plus best practices and tips.GraphQL: This page gives explains how to build GraphQL servers with Prisma ORM. It shows how Prisma ORM fits into the GraphQL ecosystem and provides practical examples.GraphQL autocompletion: Get autocompletion for Prisma Client queries in GraphQL resolvers with plain JavaScriptGraphQL autocompletion: Get autocompletion for Prisma Client queries in GraphQL resolvers with plain JavaScriptGuides: A collection of guides for various tasks and workflowsHandling exceptions and errors: This page covers how to handle exceptions and errorsHandling exceptions and errors: This page covers how to handle exceptions and errorsHono: Learn how to use Prisma ORM in a Hono appHow to use Prisma ORM's type system: How to use Prisma ORM's type systemHow to use Prisma ORM's type system: How to use Prisma ORM's type systemImport from existing database: Choose the right path to import data from PostgreSQL or MySQL into Prisma Postgres.Import from MySQL: Learn how to import data from an existing MySQL database into Prisma PostgresImport from PostgreSQL: Learn how to import data from an existing PostgreSQL database into Prisma PostgresIndexes: How to configure index functionality and add full text indexesIndexes: How to configure index functionality and add full text indexesinit: Set up a new Prisma project in the current directoryInstantiating Prisma Client: How to create and use an instance of PrismaClient in your app.Integration testing: Learn how to setup and run integration tests with Prisma and DockerIntegration testing: Learn how to setup and run integration tests with Prisma and DockerIntroduction to Prisma: Build data-driven applications with ease using Prisma ORM and Prisma PostgresIntroduction to Prisma Client: Learn how to set up and configure Prisma Client in your projectIntroduction to Prisma Client: Learn how to set up Prisma Client.Is Prisma ORM an ORM?: Learn about how Prisma ORM implements the Data Mapper ORM pattern and how it achieves the same goal as traditional ORMs without requiring you to map classes to tables as traditional ORMs do.Kysely: Get started with Kysely and Prisma Postgres by creating a type-safe SQL query builder for your databaseLegacy Prisma Migrate: Legacy Prisma Migrate is a declarative data modeling and schema migration tool that is available via the Prisma CLI.Limitations and known issues:Limitations and known issues: Learn about current limitations and known issues with Prisma Migrate, including database provider constraints and migration file compatibility.Linktree Clone SaaS: A complete vibe coding tutorial: build a full Linktree clone SaaS application from scratch using Next.js, Prisma ORM, Prisma Postgres, and Clerk authentication with AI assistanceList connections: Returns all connections the actor has access to, with optional database filter.List databases: Returns all databases the token has access to. Optionally filter by project ID.Local development: Set up and use Prisma Postgres for local developmentLogging: Learn how to configure Prisma Client to log the raw SQL queries it sends to the database and other informationLogging: Learn how to configure Prisma Client to log the raw SQL queries it sends to the database and other information.ls: List available local Prisma Postgres serversManagement API: Programmatically manage your Prisma Postgres databases, projects, and workspaces with the Management APIMany-to-many relations: Learn how to model, query, and convert many-to-many relations with Prisma ORMMany-to-many relations: How to define and work with many-to-many relations in Prisma.Many-to-many relations: Learn how to model, query, and convert many-to-many relations with Prisma ORMMany-to-many relations: How to define and work with many-to-many relations in Prisma.MCP server: Manage Prisma Postgres databases using LLMs with the Prisma Model-Context-Protocol (MCP) ServerMental model: A mental model guide for working with Prisma Migrate in your projectMetrics: Diagnose application performance with insights into Prisma Client database activity.Microsoft SQL Server: This page explains how Prisma can connect to a Microsoft SQL Server database using the Microsoft SQL Server database connector.migrate: Update your database schema with migrationsMigrate to Prisma v7: Step-by-step guide for migration your app to use the version 7 of Prisma ORMMigration histories: How Prisma ORM uses migration histories to track changes to your schemaModels: Learn about the concepts for building your data model with Prisma: Models, scalar types, enums, attributes, functions, IDs, default values and moreModels: Learn about the concepts for building your data model with Prisma: Models, scalar types, enums, attributes, functions, IDs, default values and more.Module bundlers: This page gives an overview of the most important things to be aware of when using a module bundler to bundle an application that uses Prisma Client.MongoDB: Add Prisma ORM to an existing TypeScript project with MongoDB and learn database introspection and queryingMongoDB: Create a new TypeScript project from scratch by connecting Prisma ORM to MongoDB and generating a Prisma Client for database accessMongoDB: How Prisma ORM connects to MongoDB databasesMongoose: Learn how to migrate from Mongoose to Prisma ORMMongoose: Learn how Prisma ORM compares to MongooseMongoose: Learn how Prisma ORM compares to Mongoose.Multi-schema: How to use Prisma ORM with multiple database schemasMulti-schema: How to use Prisma ORM with multiple database schemasMultiple databases: Learn how to use multiple Prisma Clients in a single app to connect to multiple databases, handle migrations, and deploy your application to VercelMySQL: Add Prisma ORM to an existing TypeScript project with MySQL and learn database introspection, baselining, and queryingMySQL: Create a new TypeScript project from scratch by connecting Prisma ORM to MySQL and generating a Prisma Client for database accessMySQL: Use Prisma ORM with MySQL databases including self-hosted MySQL/MariaDB and serverless PlanetScaleMySQL/MariaDB: This page explains how Prisma can connect to a MySQL or MariaDB database using the MySQL database connector.Native database functions: How to enable PostgreSQL native database functions for projects that use Prisma Migrate.Native database functions: How to enable PostgreSQL native database functions for projects that use Prisma Migrate.Native database types: Native database typesNative database types: Native database typesNeon: How Prisma Postgres compares to Neon, and how to migrate your data if you decide to switch.Neon: Learn how to use Prisma ORM with Neon serverless PostgreSQLNestJS: Learn how to use Prisma ORM in a NestJS appNetlify: Learn how to create Prisma Postgres databases via the official Netlify extension and deploy your applications with itNext.js: Learn how to use Prisma ORM in a Next.js app and deploy it to VercelNext.js: Best practices and troubleshooting for using Prisma ORM with Next.js applicationsNext.js: Best practices and troubleshooting for using Prisma ORM with Next.js applications.Next.js + Prisma: Step-by-step guide for integrating Prisma ORM and Prisma Postgres in an NextJS projectNo Rust engine: Learn how to use Prisma ORM without Rust enginesNull and undefined: How Prisma Client handles null and undefinedNull and undefined: How Prisma Client handles null and undefinedNuxt: A step-by-step guide to setting up and using Prisma ORM and Prisma Postgres in a Nuxt appNuxt: Learn how to integrate Prisma ORM with your Nuxt applicationNuxt: Learn how to integrate Prisma ORM with your Nuxt application.Nuxt + Prisma: Step-by-step guide for integrating Prisma ORM and Prisma Postgres in a Nuxt projectOlder versions: Upgrade guides for Prisma ORM versions 3, 4, 5, and 6One-to-many relations: How to define and work with one-to-many relations in Prisma.One-to-many relations: How to define and work with one-to-many relations in Prisma.One-to-one relations: How to define and work with one-to-one relations in Prisma.One-to-one relations: How to define and work with one-to-one relations in Prisma.OpenTelemetry tracing: Diagnose application performance with detailed traces of each queryOpenTelemetry tracing: Diagnose application performance with detailed traces of each query.Operating against partial structures of your model types: This page documents various scenarios for using the generated types from the Prisma namespaceOperating against partial structures of your model types: This page documents various scenarios for using the generated types from the Prisma namespaceORM releases and maturity levels: Learn about the release process, versioning, and maturity of Prisma ORM components and how to deal with breaking changes that might happen throughout releasesORM releases and maturity levels: Learn about the release process, versioning, and maturity of Prisma ORM components and how to deal with breaking changes that might happen throughout releases.Overview: Prisma ORM supports PostgreSQL, MySQL, SQLite, MongoDB, SQL Server, CockroachDB, and serverless databasesOverview of Prisma Migrate: Learn everything you need to know about Prisma MigrateOverview of Prisma Schema: The Prisma schema is the main method of configuration when using Prisma. It is typically called schema.prisma and contains your database connection and data modelOverview on Prisma Migrate: Learn everything you need to know about Prisma Migrate.Overview on Prisma Schema: The Prisma schema is the main method of configuration when using Prisma. It is typically called schema.prisma and contains your database connection and data model.Pagination: Learn how to paginate Prisma Client query results with offset pagination and cursor-based pagination.Pagination: Prisma Client supports both offset pagination and cursor-based pagination. Learn more about the pros and cons of different pagination approaches and how to implement them.Partner Integration: Build partner integrations that provision and transfer Prisma Postgres databases to usersPatching & hotfixing: How to reconcile the migration history after applying a hotfix or patch to a production environment.Patching & hotfixing: How to reconcile the migration history after applying a hotfix or patch to a production environment.Permit.io: Learn how to implement access control with Prisma ORM with Permit.iopgfence: Analyze Prisma Migrate SQL files for dangerous lock patterns, risk levels, and safe rewrite recipes before deploying to productionPlanetScale: Add Prisma ORM to an existing TypeScript project with PlanetScale and learn database introspection and queryingPlanetScale: Create a new TypeScript project from scratch by connecting Prisma ORM to PlanetScale and generating a Prisma Client for database accessPlanetScale: Guide to PlanetScaleplatform: Prisma Data Platform commandspnpm workspaces: Learn step-by-step how to integrate Prisma ORM in a pnpm workspaces monorepo to build scalable and modular applications efficientlyPostgreSQL: Add Prisma ORM to an existing TypeScript project with PostgreSQL and learn database introspection, baselining, and queryingPostgreSQL: Create a new TypeScript project from scratch by connecting Prisma ORM to PostgreSQL and generating a Prisma Client for database accessPostgreSQL: Use Prisma ORM with PostgreSQL databases including self-hosted, serverless (Neon, Supabase), and CockroachDBPostgreSQL: This page explains how Prisma can connect to a PostgreSQL database using the PostgreSQL database connector.PostgreSQL extensions: How to install and manage PostgreSQL extensions with Prisma ORM using customized migrations, and how to use them in Prisma ClientPostgreSQL extensions: How to install and manage PostgreSQL extensions with Prisma ORM using customized migrations, and how to use them in Prisma Client.Preview features: Upgrading your project to use a Preview feature.Preview features: Previews are typically available behind a feature flag or require some form of opt-in.Prisma CLI: The Prisma command line interface (CLI) is the primary way to interact with your Prisma project from the command line.Prisma CLI Preview features: Prisma CLI features that are currently in Preview.Prisma CLI Preview features: Prisma CLI features that are currently in Preview.Prisma CLI reference: This page gives an overview of all available Prisma CLI commands, explains their options and shows numerous usage examplesPrisma CLI reference: This page gives an overview of all available Prisma CLI commands, explains their options and shows numerous usage examples.Prisma Client: Prisma Client is Prisma ORM's generated, type-safe query builder for Node.js, Bun, and Deno applications.Prisma Client & Prisma schema: Prisma Client and Prisma schema features that are currently in PreviewPrisma Client & Prisma schema: Prisma Client and Prisma schema features that are currently in Preview.Prisma Client API: Complete API reference for Prisma Client queries and operationsPrisma Client API reference: API reference documentation for Prisma Client.Prisma Config reference: This page gives an overview of all Prisma config options available for use.Prisma Error Reference: Common Prisma ORM errors and how to troubleshoot themPrisma Error Reference: Common Prisma ORM errors and how to troubleshoot them.Prisma ORM: Prisma ORM is a next-generation Node.js and TypeScript ORM that provides type-safe database access, migrations, and a visual data editor.Prisma ORM: Learn about Prisma ORMPrisma ORM: Create a new TypeScript project from scratch by connecting Prisma ORM to Prisma Postgres and generating a Prisma Client for database accessPrisma ORM MongoDB database connector: How Prisma can connect to a MongoDB database using the MongoDB database connector.Prisma Postgres: Connect to Prisma Postgres from Prisma ORM, serverless runtimes, and PostgreSQL clients.Prisma Postgres: Add Prisma ORM to an existing TypeScript project with Prisma Postgres and learn database introspection, baselining, and queryingPrisma Postgres: Create a new TypeScript project from scratch by connecting Prisma ORM to Prisma Postgres and generating a Prisma Client for database accessPrisma Postgres FAQ: Common questions and answers about Prisma PostgresPrisma Postgres on Deno: Learn how to integrate Prisma Postgres in a Deno Deploy project using a simple Deno applicationPrisma schema reference: API reference documentation for the Prisma Schema Language (PSL).Prisma Studio: A visual database editor for viewing and managing your data with PrismaPrisma Studio: Prisma Studio is a visual database editor.Prisma validator: The Prisma validator is a utility function that takes a generated type and returns a type-safe object which adheres to the generated types model fields.Prototyping your schema: Rapidly prototype your Prisma schema using db push without migrationsPrototyping your schema: Prototyping your schemapull: Pull the state from the database to the Prisma schema using introspectionPulumi: Provision and manage Prisma Postgres with Pulumi using the Prisma Terraform provider bridge.push: Push the state from your Prisma schema to your databaseQuery Insights: Inspect slow queries, connect Prisma calls to SQL, and apply focused fixes with Prisma Postgres.Query Insights: Inspect slow queries, connect Prisma calls to SQL, and apply focused fixes with Prisma Postgres.Query optimization: How to identify and optimize query performance with PrismaQuery optimization: How to identify and optimize query performance with PrismaRaw queries: Learn how you can send raw SQL and MongoDB queries to your database using the raw() methods from the Prisma Client APIRaw queries: Learn how you can send raw SQL and MongoDB queries to your database using the raw() methods from the Prisma Client API.Raw SQL comparisons: Compare columns of the same table with raw queries in Prisma ORMRaw SQL comparisons: Compare columns of the same table with raw queries in Prisma ORMRaycast: Create and manage Prisma Postgres databases directly from RaycastReact Router 7: Learn how to use Prisma ORM and Prisma Postgres in a React Router 7 appRead replicas: Learn how to set up and use read replicas with Prisma ClientRead replicas: Learn how to set up and use read replicas with Prisma ClientReferential actions: Referential actions let you define the update and delete behavior of related models on the database levelReferential actions: Referential actions let you define the update and delete behavior of related models on the database levelRelation mode: Manage relations between records with relation modes in PrismaRelation mode: Manage relations between records with relation modes in PrismaRelation queries: Prisma Client provides convenient queries for working with relations, such as a fluent API, nested writes (transactions), nested reads and relation filtersRelation queries: Prisma Client provides convenient queries for working with relations, such as a fluent API, nested writes (transactions), nested reads and relation filters.Relations: A relation is a connection between two models in the Prisma schema. This page explains how you can define one-to-one, one-to-many and many-to-many relations in PrismaRelations: A relation is a connection between two models in the Prisma schema. This page explains how you can define one-to-one, one-to-many and many-to-many relations in Prisma.reset: Reset your database and apply all migrations. All data will be lostresolve: Resolve issues with database migrations in deployment databasesREST: This page gives an overview of the most important things when building REST APIs with Prisma. It shows practical examples and the supported libraries.Restore database (destructive): Destructive operation — this immediately and irreversibly overwrites all data in the target database with the contents of the specified backup. Any data written since the backup was taken will be lost. Ensure you have a recent backup of the target database before proceeding. Replaces the data in an existing database from a backup. Connections and credentials are preserved — only the data layer is replaced.Revoke integration tokens: Revokes the integration tokens with the given client ID.rm: Remove local Prisma Postgres serversRotate connection credentials: Generates new credentials for the connection with the given ID. Revocation of the previous credentials is best-effort.SafeQL & Prisma Client: Learn how to use SafeQL and Prisma Client extensions to work around features not natively supported by Prisma, such as PostGISSafeQL & Prisma Client: Learn how to use SafeQL and Prisma Client extensions to work around features not natively supported by Prisma, such as PostGIS.Schema API: Reference for Prisma Schema Language (PSL)Schema location: Documentation regarding proper location of Prisma Schema including default naming and multiple files.Schema location: Documentation regarding proper location of Prisma Schema including default naming and multiple files.Schema management in teams: Learn how to use Prisma Migrate effectively when collaborating on a project as a teamSDK: A TypeScript SDK for the Prisma Data Platform Management API. Use the simple client for direct API access, or the full SDK with built-in OAuth authentication and automatic token refreshseed: Seed your database with test or initial data using custom scriptsSeeding: Learn how to seed your database using Prisma ORM's integrated seeding functionality and Prisma ClientSeeding: Learn how to seed your database using Prisma ORM's integrated seeding functionality and Prisma ClientSelect fields: Learn how to return only the fields and relations you need with select and include in Prisma Client.Select fields: This page explains how to select only a subset of a model's fields and/or include relations ("eager loading") in a Prisma Client query.Self-relations: How to define and work with self-relations in Prisma.Self-relations: How to define and work with self-relations in Prisma.Sequelize: Learn how Prisma ORM compares to SequelizeSequelize: Learn how Prisma ORM compares to Sequelize.Serverless driver: Connect to Prisma Postgres from serverless and edge environmentsServerless functions: Learn how to deploy your Prisma ORM-backed apps to FaaS providers like AWS Lambda, Netlify, or Vercel Serverless FunctionsShared packages & examples: Explore the Prisma Client extensions that have been built by Prisma and its communityShared packages & examples: Explore the Prisma Client extensions that have been built by Prisma and its communityShared Prisma Client extensions: Share extensions or import shared extensions into your Prisma projectShared Prisma Client extensions: Share extensions or import shared extensions into your Prisma projectShopify: Learn how to use Prisma Postgres with ShopifyShould you use Prisma ORM?: Prisma ORM is a new kind of ORM. This page explains when Prisma ORM would be a good fit, and provides alternatives for other scenarios.SolidStart: Learn how to use Prisma ORM in a SolidStart appSpecial rules for referential actions in SQL Server and MongoDB: Circular references or multiple cascade paths can cause validation errors on Microsoft SQL Server and MongoDB. Since the database does not handle these situations out of the box, learn how to solve this problem.SQL comments: Add metadata to your SQL queries as comments for improved observability, debugging, and tracingSQL comments: Add metadata to your SQL queries as comments for improved observability, debugging, and tracing.SQL ORMs: Learn how to migrate from Sequelize or TypeORM to Prisma ORMSQL Server: Add Prisma ORM to an existing TypeScript project with SQL Server and learn database introspection, baselining, and queryingSQL Server: Create a new TypeScript project from scratch by connecting Prisma ORM to SQL Server and generating a Prisma Client for database accessSQL Server: Use Prisma ORM with Microsoft SQL Server databasesSQL Server on Docker: Download and use the Microsoft SQL Server Docker image.SQL Server on Windows (local): Set up and configure SQL Server on Windows.SQLite: Add Prisma ORM to an existing TypeScript project with SQLite and learn database introspection, baselining, and queryingSQLite: Create a new TypeScript project from scratch by connecting Prisma ORM to SQLite and generating a Prisma Client for database accessSQLite: Use Prisma ORM with SQLite databases including local SQLite, Turso (libSQL), and Cloudflare D1SQLite: This page explains how Prisma can connect to a SQLite database using the SQLite database connector.Squashing migrations: How to squash multiple migration files into a single migrationSquashing migrations: How to squash multiple migration files into a single migrationstart: Start one or more stopped local Prisma Postgres serversstatus: Show Prisma Data Platform service statusstatus: Check the status of your database migrationsstop: Stop local Prisma Postgres serversstudio: Browse and manage your database data with Prisma Studio web interfaceStudio in VS Code: Learn how to use Prisma Studio directly in VS CodeSupabase: Learn how to migrate from Supabase to Prisma PostgresSupabase: Learn how to use Prisma ORM with Supabase PostgreSQLSupport: Find the right support for any Console questionSupported databases: This page lists all the databases and their versions that are supported by Prisma ORMSupported databases: This page lists all the databases and their versions that are supported by Prisma ORM.SvelteKit: Learn how to use Prisma ORM in a SvelteKit appSystem requirements: System requirements for running Prisma ORMSystem requirements: System requirements for running Prisma ORMTable inheritance: Learn about the use cases and patterns for table inheritance in Prisma ORM that enable usage of union types or polymorphic structures in your application.Table inheritance: Learn about the use cases and patterns for table inheritance in Prisma ORM that enable usage of union types or polymorphic structures in your application.Tabnine: Learn tips and best practices for using Prisma ORM with the Tabnine AI code editorTabnine: Learn tips and best practices for using Prisma ORM with the Tabnine AI code editor.TanStack Start: Learn how to use Prisma ORM in a TanStack Start appTeam development: How to use Prisma Migrate when collaborating on a project as a team.Terraform: Provision and manage Prisma Postgres projects, databases, and connections using Terraform.Testing: How to implement unit and integration testing with Prisma ORMTo v7: Guide on how to upgrade to Prisma ORM 7Traditional servers: Learn how to deploy your Prisma-backed apps to PaaS providers like Heroku, Koyeb, or AWS EC2Transactions and batch queries: This page explains the transactions API of Prisma ClientTransactions and batch queries: This page explains the transactions API of Prisma Client.Transfer project: Transfer the project with the given ID to the new owner's workspaceTroubleshooting: Resolve common issues with Prisma PostgresTroubleshooting: Troubleshooting issues with Prisma Migrate in a development environment.Troubleshooting: Troubleshooting issues with Prisma Migrate in a development environment.Troubleshooting binary size and deployment issues: This page covers how to resolve large bundle sizes, slow builds, and deployment errors caused by Prisma ORM Rust engine binariesTroubleshooting relations:Troubleshooting relations: Common problems and solutions when defining relations in the Prisma schema, including self-relations and implicit many-to-many relations.Turborepo: Learn step-by-step how to integrate Prisma ORM with Turborepo to build modular, scalable monorepo architectures efficientlyTurborepo + Prisma: Step-by-step guide for integrating Prisma ORM and Prisma Postgres in a Turborepo monorepoTurso: Learn how to use Prisma ORM with Turso SQLiteType safety: Prisma Client provides full type safety for queries, even for partial queries or included relations. This page explains how to leverage the generated types and utilities.Type safety Overview: Prisma Client provides full type safety for queries, even for partial queries or included relations. This page explains how to leverage the generated types and utilitiesType utilities: Advanced type safety: improve type safety in your custom model methodsType utilities: Advanced type safety: improve type safety in your custom model methodsTypedSQL: Learn how to use TypedSQL to write fully type-safe SQL queries that are compatible with any SQL console and Prisma ClientTypedSQL: Learn how to use TypedSQL to write fully type-safe SQL queries that are compatible with any SQL console and Prisma Client.TypeORM: Get started with TypeORM and Prisma Postgres by connecting your TypeScript ORM to a managed PostgreSQL databaseTypeORM: Learn how Prisma compares to TypeORMTypeORM: Learn how Prisma compares to TypeORM.TypeScript performance: Optimize TypeScript compilation performance when working with large Prisma schemasTypeScript performance: Optimize TypeScript compilation performance when working with large Prisma schemasUnderstanding Migrations: A mental model guide for working with Prisma Migrate in your projectUnit testing: Learn how to setup and run unit tests with Prisma ClientUnit testing: Learn how to setup and run unit tests with Prisma ClientUnsupported database features (Prisma Migrate): How to include unsupported database features for projects that use Prisma MigrateUnsupported database features (Prisma Migrate): How to include unsupported database features for projects that use Prisma Migrate.Unsupported database features (Prisma Schema): How to support database features that do not have an equivalent syntax in Prisma Schema LanguageUnsupported database features (Prisma Schema): How to support database features that do not have an equivalent syntax in Prisma Schema Language.Update database: Updates the database with the given ID.Update project: Updates the project with the given ID.Upgrade to v1: Comprehensive guide for upgrading from Prisma 1 to Prisma ORM v1Upgrade to v3: Comprehensive guide for upgrading to Prisma ORM v3Upgrade to v4: Comprehensive guide for upgrading to Prisma ORM v4Upgrade to v5: Comprehensive guide for upgrading to Prisma ORM v5Upgrade to v6: Comprehensive guide for upgrading to Prisma ORM v6Upgrade to v7: Comprehensive guide for upgrading to Prisma ORM v7Using API Clients: Use the Management API with popular API clients like Postman, Insomnia, and Yaakvalidate: Validate your Prisma schema for syntax errors and configuration issuesVercel: Learn how to create Prisma Postgres databases via the Vercel Marketplace and deploy your Next.js, Nuxt, and SvelteKit applications.Vercel app deployment: Learn how to programmatically deploy applications with Vercel and Prisma Postgres using the instant deployment APIversion: Display Prisma version information for CLI, Client, and engine binariesViewing data: Viewing and editing data in Prisma Postgres via Prisma Studio or other database GUIsViews: How to include views in your Prisma schemaViews: How to include views in your Prisma schemaVS Code: The Prisma VS Code extension provides a management UI for Prisma Postgres and superpowers for Copilot agent modeWhat are Client Extensions: Extend the functionality of Prisma ClientWhat is introspection?: Learn how you can introspect your database to generate a data model into your Prisma schemaWhat is introspection?: Learn how you can introspect your database to generate a data model into your Prisma schema.What is Prisma ORM?: This page gives a high-level overview of what Prisma ORM is and how it works. It's a great starting point for Prisma newcomers!Why Prisma ORM?: Learn about the motivation for Prisma ORM and how it compares to other Node.js and TypeScript database tools like ORMs and SQL query builders.Windsurf: Learn tips and best practices for using Prisma ORM with the Windsurf AI code editorWindsurf: Learn tips and best practices for using Prisma ORM with the Windsurf AI code editor.Working with compound IDs and unique constraints: How to read, write, and filter by compound IDs and unique constraintsWorking with compound IDs and unique constraints: How to read, write, and filter by compound IDs and unique constraints.Working with Json fields: How to read, write, and filter by Json fieldsWorking with Json fields: How to read, write, and filter by Json fields.Working with scalar lists: How to read, write, and filter by scalar lists / arraysWorking with scalar lists: How to read, write, and filter by scalar lists / arrays.Write your own SQL: Learn how to use raw SQL queries in Prisma ClientWrite your own SQL: Learn how to use raw SQL queries in Prisma Client.Writing guides: Learn how to write clear, consistent, and helpful guides for Prisma documentation
Options
Meet the modern standard for public facing documentation. Beautiful out of the box, easy to maintain, and optimized for user engagement.
Search through billions of items for similar matches to any object, in milliseconds. It’s the next generation of search, an API call away.
Build and deploy reliable background jobs with no timeouts and no infrastructure to manage.
Get the simple developer experience of SQLite in production, and scale your multi-tenant backend with unlimited databases.
Upstash is a serverless data platform providing low latency and high scalability for real-time applications.
One-click deployments built for teams, tuned for Laravel, loaded with tools and goodies you're going to love.