Prisma

P

Prisma

The official Discord for the Prisma ORM and Prisma Data Platform! Learn more at https://prisma.io

Join

Able to setup Accelerate, unable to setup Pulse. AWS RDS Postgres.

The error : "Prisma Pulse could not reach the specified datasource db url. This could be caused by an incorrect datasource URL or database firewall rules, or certificate issues. This is probably not a problem with Prisma Pulse. The network error was: "Postgres client.connect() is unresponsive." With the connection string, I can connect using other pgTools from my own computer. My Prisma ORM is using the same connection string and is able to function with Accelerate. I have followed the instructions in (https://www.prisma.io/docs/pulse/database-setup/aws-rds) and set the rds.logical_replication to 1 (true)....
No description

Why does this function not work?

I'm trying to create a prisma file (/lib/db.ts) to initialize from anywhere in my code when I need it. Why does $disccount and $use not work and how do i get it to work if it is necessary. Here is code: ```import { PrismaClient, Prisma } from '@prisma/client'...
No description

Accelerate On-Demand Invalidation Rate Limit

What's the rate limit for programatic/on-demand cache invalidation? I can't find any details in the documentation

Tool to write schema by hand

Greetings everyone, I have a quite weird question, does a specific tool exist which i can use to write my prisma schema manually, because i feel too dumb to write my schema manually for my mongodb instance. Thanks...

Records found that don't exist (Supabase + Prisma)

I've got a very wierd bug I can't figure out. I've deleted all my records in Supabase for table upvote, but I am somehow able to find a non-existant record and delete it! When adding an upvote, I'm checking for a record. If one exists already, I delete it, if not I create one. Even after clearing the table, it is able to find an existing record and try to delete it (even with a success message) although no record should even exist....
No description

Correct way to setup prisma + docker

(I am new to prisma this is my first project using it) Hi I am currently trying to dockerise one of my typescript apps (discord bot) which is using prisma with sqlite database. I am in the middle of writing the dockerfile This is it so far: ``` FROM node:18-alpine ...

Error validating datasource URL must start with the protocol prisma://

Hello, I'm having this issue when deploying my Next application to Vercel. Everything works fine locally. I have triple-checked env variables on Vercel and they're the same as my env locally. I also get this error if I build the project and run prod environment locally without deploying to Vercel. Any idea what might cause this; and how to solve it?...
No description

TypeError: client._engine.apiKey is not a function

node_modules/@prisma/extension-accelerate/dist/cjs/extension.js:81:40
node_modules/@prisma/extension-accelerate/dist/cjs/extension.js:81:40
I'm having trouble starting my prisma client locally, do I need to login or something?...

AWS SAM + Lambda not bundling properly.

Hi guys. I'm writing an AWS SAM template in which I am setting up Prisma with my Lambda functions to interact with my RDS Postgres DB. I am facing an error that I suspect might be related to the query engine and prisma.schema not being bundled with the code. The error I am getting is: ``` Prisma Client could not locate the Query Engine for runtime "rhel-openssl-3.0.x". ...

`The Query did not produce a result within the maximum allowed execution time of 10 seconds.`

For a while now we're occasionally getting said error while building our app in GitHub Actions, connecting via Accelerate to MongoDB. The weird thing is, that said collection is basically empty (10 documents) and its documents are tiny. There is no plausible reason that makes this occasionally fail. Can you check what is going on there? We tried adding a cacheStrategy hoping to mitigate this somehow - to no avail. Can you check this request-id for some more detailed logs? 8cb4413f8e688d90
No description

dev.db-journal is always created

Could you create a simple dummy project and install Prisma using SQLite ? Does it also always, even with the simplest model, create an dev.db-journal file for you ? I read that this file is a rollback journal file and should only be present temporary during a transaction....

introspecting never loading

Hi, I have a freshly setup project and db with a couple simple tables in it, and when I pull my db with prisma, I just infinitely load on introspecting based on datasource defined in prisma/schema.prisma. How do I fix this and get past this? I made sure the configuration and DB url is correct. I am using supabase for a db
Solution:
I actually made a mistake, I needed direct URL and everything is working great! New to prisma so unaware of it.

JSON Filtering on object key value inside array example from doc doesn't work

model Test { id String @id @default(uuid()) @db.Uuid data Json }
await db.Test.create({data: {data: [{petName:"Claudine"}, {petName: "Sunny"}]}})...

.update return null when data is found using .findUnique using the same where clause (version 5.17.

How is this even possible ? my updatedUser is null, and no updated has been performed But the data exist since the user is found successfully no error is thrown by prisma just updatedUser being null...

Error when using accelerate (Local Development)

ref: https://www.prisma.io/docs/accelerate/local-development i did run prisma generate after updating DB URL. im using sveltekit and postgres db. ...

Any way to decrease prisma client size for Cloudflare D1?

I have a small schema with two models and running prisma generate takes the bundle size from 30kb to 860kb which is super unreasonable for a serverless project. Is this intended and is there anything I can do to decrease the size in production?
Solution:
This is intended, yes, and no there’s no improvements to be made beyond ensuring that you’re generating the minimum amount of code.

Property does not exist on type..but it clearly does.

```js
const lastIdResult = prisma.descriptionDiff.findFirst({ where: { packageId: thisPackage.id...
No description

How to kill idle connections properly in postgres

Prisma has been creating too many connections on my app. I have this: ```...

NestJs + Prisma Optimize

Hello everyone! I would like to ask if anyone has managed to integrate a NestJs server with the Optimize tool and how. I have tried this instantiation part in a few ways...

Prisma Accelerate Typescript

Hey, what are the typings for Prisma Accelerate? why is prismaClientSingleton = any? this make no sense ```ts import { PrismaClient } from "@prisma/client/edge";...