Prisma

P

Prisma

The official Discord server of Prisma! Find us online at prisma.io

Join

Optimize Server Error

I'm trying to setup optimize for an existing db and keep getting this page. Please advise, it's persisted for several days now.
No description

Accelerate w/o ORM questions

Hey - so after going bacfk & forth between drizzle/neon & prisma orm/prisma pg, I've decided to try drizzle + prisma postgres combo. I love the prisma orm but its 100x faster to get type safe & validated API endpoints up & running with drizzle & zod. (prisma's 3rd party zod generator no longer works). That said, I do prefer parts of prisma's DX like the prisma dev cli + local DB instances & prisma studio over drizzle studio or neon local proxy. ...

Does Prisma support executing PostgreSQL anonymous code blocks?

We created incident in prouction recently when we just blindly executed migration on huge table and it locked the whole table. We got to conclusion that we need to do some stuff in small batches manually. Maybe even by writing custom script. I looked at this thread on git, and I see there are no plans to support it in near future - https://github.com/prisma/prisma/issues/15384 Luckily, some of our migrations can be done using pure SQL, so writing custom script looks unnecessary....

🚧 NestJS + Prisma Multi-Schema Setup Issue

Struggling to configure multi-schema support in Prisma with NestJS? Separated models/ across multiple files in nestjs. Please help me....
No description

Multiple prisma schemas with custom output directory throws errors on generate

Hi. This is my codebase structure: - prisma/schema.prisma (I have main config like db connection here) - prisma/schema directory which contains multiple .prisma files...

model with pre-defined sub-model

Ciao, let assume i want to create a list of sub-model to use inside the model. is it possible? exampe model LogInfo{ insTS DateTime? @default(now()) updTS DateTime? @updatedAt...

Proposal for a Documentation Improvement Regarding TypeScript Performance

Hi everyone, I recently ran into a significant IDE performance issue in my project with Prisma, and after some digging, I was lucky enough to pinpoint the cause. The core of the problem isn't an issue with Prisma itself, but rather a subtle pitfall in how Prisma's generated types are used within TypeScript. I believe other developers might easily encounter the same thing....

Does Prisma offer professional services for ORM?

We are looking to engage with some professional services for extension design. Do any of the prisma maintainers offer this?

Prevent prisma from dropping custom index

How can I prevent prisma from trying to drop my custom index every time I try to run migrate dev? ```sql CREATE INDEX idx_meterid_readingat_covering ON "Reading" ("meterId", "readingAt")...

Possible to use dexter with postgresql + prisma?

I suck at deciding when to use indexes. could i use dexter with postgresql and prisma, will it work fine?

Enabling `vector` in Prisma Postgres DB

I'm trying to enable pgvector in prisma postgres. Be it via running migration script or connecting to the db and executing the command: CREAT EXTENSION vector; it does not work. Instead, I just get this error: ``` ERROR: extension "vector" is not available DETAIL: Could not open extension control file "/usr/local/share/postgresql/extension/vector.control": No such file or directory....

# 🚨 URGENT: Production Database Lost After `prisma migrate reset` - Need Emergency Recovery Help

CRITICAL PRODUCTION DATA LOSS What Happened - Accidentally ran prisma migrate reset on production database at 20:00 today (June 29, 2025) - Lost 180+ research protocols (critical production data)...

Distinguishing errors

``` { "code": "P2002", "meta": { "modelName": "User",...

Where to find PrismaClientKnownRequestError with the new generated client

I cannot find the right place to import PrismaClientKnownRequestError from with the new version. This is my schema: ```prisma datasource db { provider = "sqlite" url = env("PRISMA_DATABASE_URL")...

Error validating datasource `db`

Hello, I am using 2 postgres dbs and have followed -https://www.prisma.io/docs/guides/multiple-databases guide to set them up. I am deploying on Railway. On running yarn dev I am getting the following error - Error validating datasource db: the URL must start with the protocol prisma:// or prisma+postgres:// Not sure what is amiss, please help!...
No description

Accelerate Latency:

Heeey! I have a question… has anyone experienced a similar latency issue with Accelerate? This query should be really fast — and actually is, as you can see in the traces — but there are three consecutive requests to Accelerate that each take more than 3 seconds…...
No description

Docker mysql + Prisma : Can t create/save changes/actions in Prisma studio

Hi y all 🟠 I vee been browsing the web back and for a solution related to this case , so I have a Docker mysql container which I binded with Prisma within the app config , the containers runs well and I intend to make a user within Prisma studio than use the client too to get the response from the server The issue is that I can t save the user created within the studio , if anyone could help I ll truly appreciate it 😀...
No description

Binary does not get bundled for lambdas

Upon sls deploy, all goes well. But when I try to hit an endpoint that will connect to the DB, I see: "Prisma Client could not locate the Query Engine for runtime "rhel-openssl-3.0.x".\n\nThis is likely caused by a bundler that has not copied "libquery_engine-rhel-openssl-3.0.x.so.node" next to the resulting bundle.\nEnsure that "libquery_engine-rhel-openssl-3.0.x.so.node" has been copied next to the bundle or in "prisma/generated/client" "The following locations have been searched:", " /var/task/prisma/generated/client",...

Console Spam: "CODE: PrismaClientOnContextInstanceOfStrategyFailed"

Hey guys, getting a constant spam of this error/warning: ``` CODE: PrismaClientOnContextInstanceOfStrategyFailed WARNING: Prisma Client on GraphQL context failed being checked using instanceof REASON: The Prisma Client class reference imported from @prisma/client is not the same class used by you to create your Prisma Client instance....

prisma-client "Model" suffix?

The "prisma-client" early access docs say to import models like this
import { User, Post } from "./generated/prisma/models.js"
import { User, Post } from "./generated/prisma/models.js"
...