Prisma

P

Prisma

Join the community to ask questions about Prisma and get answers from other members.

Join

nexus-prisma support for prisma v6

Hi guys. I am trying to upgrade to version 6, but it seems that nexus prisma doesn't support v6. It's a warning, so I am not sure if we can use it wuth version 6. Any help? [email protected] does not officially support @prisma/[email protected]. The officially supported range is: ^5.0.0....

Issues connecting

Is anyone else having issues connecting to their db suddenly? in the last hour or so prisma studio won't load and i'm getting a p6000 when trying to upsert in code.

Prisma studio unaccessible (local studio & console.prisma.io)

Hi ! Is there a bug with Prisma Studio ? I can't access to my database content through prisma studio nor with Studio in console.prisma.io After a loading, I got this error ```Message: Error in Prisma Client request:...

Without getting into the workplace philosophy...

... a conversation with my boss went like this. me: I've never worked with prisma him: you should learn ...

Filter on url in GCP lots and all my prisma SQL dissapears!!!

This is a plea for prisma to please log on the thread of execution as asyncLocalStorage is used by devops teams so they can filter on requestId or url especially when we get a complaint on a specific request id. all logs EXCEPT our prisma logs come out looking like the 2nd picture and we can filter on ANY of those with a simple right click but only 3rd party library that logs wrong seems to be prisma. We have this code and if the $on ran on the thread that ran the SQL, it would be much better for devops to pinpoint issues -> const prismaClient = new PrismaClient({ datasources: { db: { url: databaseUrl, },...
No description

queryRaw plsql function failed Code: `42601`. Message: `ERROR: syntax error at or near "$1"`

Hi everyone, I'm trying to call a function in my Postgres DB with this signature:
CREATE OR REPLACE FUNCTION main.create_brand_global_search_mv(brand_id TEXT) RETURNS TEXT AS $$
CREATE OR REPLACE FUNCTION main.create_brand_global_search_mv(brand_id TEXT) RETURNS TEXT AS $$
...

Starter Spend Limit

Hello, I'm currently using Prisma Postgres for one of my projects and was wondering if I would be able to set spend limits or budget controls on the Starter Plan. On the pricing page, the card for the starter plan says no, but the FAQ at the bottom suggests that you can. I would just like some clarification before committing....
No description

Upgrade from Prisma Postgres EA to GA - pg_dump Connection Error

Hi, I'm trying to upgrade from Prisma Postgres Early Access (EA) to General Availability (GA). According to the documentation, I need to create a backup of my existing database using pg_dump. However, when running the following command: `futbolovo % PGSSLMODE=disable \ pg_dump ...

Timed out fetching a new connection from the connection pool

We're using prisma on vercel, to connect to supabase with the pgbouncer. We set the connection limit to3, timout to 60sec, but we still get this error when the traffic goes up. Since its in a serverless environment, multiple function invocation can happen at the same time, and it appears Vercel somehow stops the functions (or freezes them ?) at the end of each request....

Multiple DBs in a project

This issue was created almost 5 years ago and is still open. Competitors such as Drizzle support it, so if there's not a plan to add this functionality, I'll have to start migrating my project. The solution recommended in the ticket doesn't work cleanly with migrations, is there a way to specifiy where migrations live? or specify in the build which migrations directory to run for each database? Thank you!...

Cloudflare D1 Performance

I'm doing a straight forward query of a small DB from a cloudflare worker (with Hono) using Prisma. Locally the query take 8ms (measured from worker), but on the cloud the query takes between 200ms to over 1s. ``` start = performance.now() if (c.get('caller') !== 'worker') {...

Audit Logging

Hello prisma people. I would like to setup Audit logging on all of the tables in my DB. On the prisma docs/github I see two main ways to achieve this: 1. Using prisma client extensions. 2. Using custom triggers from migrations + client extensions. (~2 years old) ...

Prisma with multi environments

Hello there, I'm trying to use Prisma for both development and production environment. I have two environment files: - .env.development - .env.production ...

Turborepo setup not working with prisma: Cannot find module `fs`

I have started to migrate my basic NextJs application to turborepo and am facing some issues with using prisma client. I have a nextJs app with trpc among others and we use mongodb. I have followed this link https://www.prisma.io/docs/guides/using-prisma-orm-with-turborepo but I see that while I am using this from the web app I see an error regarding the use of fs in the browser. Upon inspecting the generated/client/index.js file I see this code <attached screenshot>. Can anyone please help re...
No description

pulse something went wrong

Hi, i keep getting the message when i try to create project. currently im hosting database at Neon as i need data to near to me which is Singapore. but now i cant create project for my prisma pulse. i did try sslmode=disable postgresql://neondb_owner:[password]@ep-billowing-sound-a1tdsq6a-pooler.ap-southeast-1.aws.neon.tech/neondb?sslmode=require i also not sure to use pooling or not....

Prisma Accelerate and Aurora Serverless

Hello, I'm looking to set up prisma accelerate with a database hosted in AWS. We are moving away from render.com because our clients are enterprise and only have AWS as an approved vendor. We use serverless functions for our back end, so we'd like to use accelerate or another connection pooler to avoid maxing our db connections. We were looking at Aurora Serverless for our db option. It doesn't seem like aurora serverless supports static IPs, so we are unsure how we'd connect accelerate to aurora serverless. ...

How to properly deal with connections pool and disconnects

Hi everyone! At the company that I work, we were facing a problem where too many Prisma connections were making our database slow down considerably, freezing our entire system, we them added a bunch of disconnects after some important and long queries (this is a production env) , the problem was solved, at peak we had 5k connections and now we are sitting at 600ish Now some important parts of our system are throwing the following error: Transaction ID is invalid, refers to an old closed transaction Prisma does not have information about it anymore, or was obtained before disconnecting. We thought that maybe we were disconnecting too much, and possibly affecting ongoing transactions, we are trying to narrow down removing some disconnects, but we fear that our problem with the DB (Postgresql) happens again. I would be glad if someone could provide some guidance, what should be investigated, and possible solutions...

Issues with Prisma in Turborepo

I'm essentially generating the client and compiling a commonjs version so that i can use my Prisma client across our monorepo. this works, however, when i try to extend the client to use extensions, it breaks with the following error:
Error: Cannot find module '.prisma/client/default'
Error: Cannot find module '.prisma/client/default'
I've been at this for a day now, and I'm slowly losing my sanity with this. I don't understand why extending the client would break it. I tried looking for flags to include extensions in the generated client but couldn't find anything....
No description

What is the good practice for migrations and keeping them on GitHub?

Hello, I started my full stack project and currently we are in dilemma. Here is the scenario, our database will update accordingly with the project, we want to release some feature later let's use Reddit karma for example which is (I assume) only one table column added, if our project already has a lot of online users is there a way we can update our database without resetting and how to do it? I assume it is with prisma migrations, if that is the case, should we keep the migration files on our GitHub repository or are we allowed to either delete them or add them to .gitignore? Thank you in advance....