Guides
Every guide in Prisma Documentation Docs.
Introduction
Migrating off Accelerate
Features
Reference
More
Start
Prisma ORM
Prisma Postgres
Guides
GuidesNext.jsAstroNuxtSvelteKitSolidStartReact Router 7TanStack StartNestJSHonoElysiaBunDenoCloudflare WorkersCloudflare D1DockerTurborepopnpm workspacesBun workspacesMultiple databasesExpand-and-contract migrationsSchema management in teamsDrizzleSQL ORMsMongooseAI SDK (with Next.js)GitHub ActionsNeon with AccelerateSupabase with Accelerate
Upgrade Prisma ORM
Introduction
Data Modeling
Contract Authoring
Fundamentals
Migrations
Middleware
Extensions
Reference
Database
Tools & Integrations
Infrastructure as Code
More
Getting Started
Prisma ORM
Prisma Postgres
Build
Deploy
Manage
Reference
Introduction
Concepts
Workflows
Reference
Tools
Prompts
Tutorials
Reference
Introduction
Features
Integrations
More
Introduction
Standalone commands
Migrate commands
Dev commands
DB commands
Console commands
Platform
ORM
Migration
Utility
Guides
Next.jsAstroNuxtSvelteKitSolidStartReact RouterTanStack StartNestJSHonoElysiaBunDenoCloudflare WorkersDockerTurborepopnpm workspacesBun workspacesClerk (with Next.js)Clerk (with Astro)Better Auth (with Next.js)Better Auth (with Astro)Auth.js (with Next.js)AI SDK (with Next.js)Embedded Prisma Studio (with Next.js)GitHub ActionsVercel app deploymentPrisma Postgres on DenoDatadogpgfencePermit.ioPlasmicShopifyVercelNetlifyFly.ioFirebase StudioViewing dataMultiple databasesExpand-and-contract migrationsSchema management in teamsDrizzleSQL ORMsMongooseMigrate from SupabaseMigrate from NeonUpgrade to v7Upgrade to v6Upgrade to v5Upgrade to v4Upgrade to v3Upgrade to v1Writing guides
Local Development
Introduction
Core Concepts
What is Prisma ORM?Why Prisma ORM?Should you use Prisma ORM?Data modelingData modelingOverviewPostgreSQLMySQLSQLiteSQL ServerMongoDBDatabase driversPostgreSQLMySQL/MariaDBSQLiteMicrosoft SQL ServerSQL Server on Windows (local)SQL Server on DockerPrisma ORM MongoDB database connectorDatabase driversCockroachDBPlanetScaleNeonSupabaseTursoCloudflare D1Is Prisma ORM an ORM?GraphQLRESTFullstackBeyond Prisma ORMAPI patterns
Prisma Schema
Overview of Prisma SchemaData sourcesGeneratorsSchema locationOverview on Prisma SchemaData sourcesGeneratorsSchema locationModelsModelsRelationsOne-to-one relationsOne-to-many relationsMany-to-many relationsSelf-relationsReferential actionsRelation modeTroubleshooting relationsRelationsOne-to-one relationsOne-to-many relationsMany-to-many relationsSelf-relationsReferential actionsSpecial rules for referential actions in SQL Server and MongoDBRelation modeTroubleshooting relationsDatabase mappingIndexesViewsMulti-schemaExternal tablesTable inheritanceUnsupported database features (Prisma Schema)Database mappingIndexesViewsMulti-schemaExternal tablesTable inheritanceUnsupported database features (Prisma Schema)What is introspection?PostgreSQL extensionsWhat is introspection?PostgreSQL extensions
Prisma Client
Prisma ClientIntroduction to Prisma ClientGenerating Prisma ClientCustom model and field namesRead replicasDatabase polyfillsConfiguring error formattingIntroduction to Prisma ClientGenerating Prisma ClientInstantiating Prisma ClientDatabase connectionsConnection poolConnection managementConfigure Prisma Client with PgBouncerDatabase connectionsConnection poolConnection managementConfigure Prisma Client with PgBouncerCustom model and field namesRead replicasDatabase polyfillsNo Rust engineConfiguring error formattingCRUDSelect fieldsExcluding fieldsRelation queriesFiltering and sortingPaginationAggregation, grouping, and summarizingTransactions and batch queriesFull-text searchQuery optimizationCRUDSelect fieldsExcluding fieldsRelation queriesFiltering and SortingPaginationAggregation, grouping, and summarizingComputed fieldsCustom modelsTransactions and batch queriesFull-text searchCase sensitivityCustom validationQuery optimizationWhat are Client ExtensionsAdd methods to Prisma ClientAdd custom methods to your modelsCreate custom Prisma Client queriesAdd custom fields and methods to query resultsType utilitiesExtensionsclient: Add methods to Prisma Clientmodel: Add custom methods to your modelsquery: Create custom Prisma Client queriesresult: Add custom fields and methods to query resultsType utilitiesShared Prisma Client extensionsFine-Grained Authorization (Permit)Shared Prisma Client extensionsFine-Grained Authorization (Permit)Shared packages & examplesShared packages & examplesDeploy Prisma ORMDeploying database changes with Prisma MigrateDeploy migrations from a local environmentCaveats when deploying to AWS platformsDeploy Prisma ORMDeploying database changes with Prisma MigrateDeploy migrations from a local environmentDeploy to a different OSModule bundlersCaveats when deploying to AWS platformsDeploy to VercelDeploy to AWS LambdaDeploy to Azure FunctionsDeploy to NetlifyServerless functionsDeploy to VercelDeploy to AWS LambdaDeploy to Azure FunctionsDeploy to NetlifyDeploying edge functions with Prisma ORMDeploy to Vercel Edge Functions & MiddlewareDeploy to Cloudflare Workers & PagesDeploy to Deno DeployEdge functionsDeploying edge functions with Prisma ORMDeploy to Vercel Edge Functions & MiddlewareDeploy to Cloudflare Workers & PagesDeploy to Deno DeployDeploy to HerokuDeploy to RailwayDeploy to Fly.ioDeploy to KoyebDeploy to RenderDeploy to SevallaTraditional serversDeploy to HerokuDeploy to RailwayDeploy to Fly.ioDeploy to KoyebDeploy to RenderDeploy to SevallaLoggingOpenTelemetry tracingSQL commentsLoggingMetricsOpenTelemetry tracingSQL commentsDebuggingHandling exceptions and errorsDebuggingHandling exceptions and errorsTroubleshooting binary size and deployment issuesFields & typesWorking with Json fieldsWorking with scalar listsWorking with compound IDs and unique constraintsComposite typesNull and undefinedFields & typesWorking with Json fieldsWorking with scalar listsWorking with compound IDs and unique constraintsComposite typesNull and undefinedUnit testingIntegration testingTestingUnit testingIntegration testingType safety OverviewHow to use Prisma ORM's type systemOperating against partial structures of your model typesType safetyHow to use Prisma ORM's type systemPrisma validatorOperating against partial structures of your model typesWrite your own SQLRaw queriesTypedSQLSafeQL & Prisma ClientWrite your own SQLRaw queriesTypedSQLSafeQL & Prisma Client
Prisma Migrate
Getting started with Prisma MigrateOverview on Prisma MigrateMental modelAbout migration historiesAbout the shadow databaseLimitations and known issuesLegacy Prisma MigrateOverview of Prisma MigrateGetting started with Prisma MigrateUnderstanding MigrationsMigration historiesAbout the shadow databaseLimitations and known issuesPrototyping your schemaDevelopment and productionBaselining a databaseCustomizing migrationsGenerating down migrationsSquashing migrationsPatching & hotfixingSeedingNative database typesNative database functionsUnsupported database features (Prisma Migrate)TroubleshootingPrototyping your schemaDevelopment and productionTeam developmentBaselining a databaseCustomizing migrationsData migrationsGenerating down migrationsSquashing migrationsPatching & hotfixingSeedingNative database typesNative database functionsUnsupported database features (Prisma Migrate)Troubleshooting
Reference
Prisma CLI referencePrisma Client API referencePrisma schema referencePrisma Config referenceConnection URLsEnvironment variables referenceDatabase features matrixSupported databasesSystem requirementsError message referencePrisma Error ReferencePreview featuresPrisma Client & Prisma schemaPrisma CLI Preview featuresPrisma CLI referencePrisma Client APISchema APIConfig APIConnection URLsEnvironment VariablesDatabase FeaturesSupported databasesSystem requirementsError ReferencePrisma Error ReferencePrisma Client & Prisma schemaPrisma CLI Preview features
More
Prisma CLIPrisma StudioBest practicesORM releases and maturity levelsDrizzleTypeORMSequelizeMongooseDrizzleTypeORMSequelizeMongooseDev environmentEnvironment variablesEditor setupEnvironment variablesEditor setupNext.jsNuxtMany-to-many relationsCheck constraintsRaw SQL comparisonsGraphQL autocompletionBundler issuesTypeScript performanceNext.jsNuxtMany-to-many relationsCheck constraintsRaw SQL comparisonsGraphQL autocompletionBundler issuesTypeScript performanceORM releases and maturity levelsGitHub CopilotCursorChatGPTTabnineWindsurfEnginesTo v7Older versionsPreview featuresFrom v1
Introduction
Authentication & Tools
Endpoints
Delete databaseGet databaseList databasesGet list of databasesUpdate databaseRestore database (destructive)Create databaseCreate databaseGet list of backupsGet database usage metricsGet list of database connectionsCreate database connection stringDelete integrationRevoke integration tokensGet integration by IDGet list of integrationsGet list of integrationsDelete projectGet projectGet list of projectsUpdate projectTransfer projectCreate project with a postgres databaseGet workspace subscriptionGet workspaceGet list of workspacesDelete connectionGet connectionList connectionsRotate connection credentialsCreate connectionGet all regionsGet current authenticated principalGet Prisma Accelerate regionsGet Prisma Postgres regionsDelete bucket keyDelete bucketList bucket keysGet bucketList bucketsUpdate bucketCreate bucket keyCreate bucketDelete service tokenList service tokensCreate service tokenPoll an approval