Supabase/Prisma DB Issues
Hi all,
We've noticed a few different issues with our postgres instance via Prisma (hosted in Supabase). We're having a hard-time identifying what's missing in order to fix these errors. Ideally, something is misconfigured / with your help, we can fix these issues. Database health wise, utilization on average seems healthy (but has spiked some days). We use Primsa as our ORM / many of these errors are in Prisma-speak
Here are some of the errors we've seen:...
My items dont update on deletion.
This isnt a bug, its just bad coding on my side.
page.tsx fetches the data from prisma serverside, then passes it through components such as VaultPage, and i just noticed when you DELETE items using the buttons in these client side components it does not revalidate the data until a reload.
https://github.com/LockScript/Lockscript-Vault...
Prisma and Pothos integration using Raw SQL
I have a use case where a “prismaField” implements resolve which is based on Raw SQL because of full-text search usage. Let's say we are searching for users by name through full-text search.
The key problem starts when I use Prisma Pothos.js integration to solve N+1 through relations.
Code example from pothos.js prisma docs...
Transactions across Files
I have the following two calls, one a direct Prisma call and the other one a Service call which does multiple inner Prisma calls.
```
await prisma.comment.delete({
where: { id },...
TypeScript error when using select argument type
Hi,
The following code snippet is working fine,
```
const results = await prisma.orders.findMany({
select: {...
Help creating computed fields
Hi! im trying to do an extension of PrismaClient so I can add a computed field.
each pageItem has a relation of many-to-many with products, and each product have a type.
I wish to generate a computed field named "isMerch" that its true when all the products it contain are of type "MERCH".
Here is my approach, far from being usefull...
...
Strange type error in seeding file
I have a strange issue with my seeding file.
```
import { PrismaClient } from "@prisma/client";
import { v4 as uuidv4 } from "uuid";...
Postgis in Prisma Postgres
Hey 😄
Not sure if this has already been answered somewhere but is postgis supported in Prisma Postgres? I know its in early access but wanted to check when would that be available? The product looks great congrats to the team! 🥳...
Nonsense error on correctly structured query
Hi, I got this error in production complaining about values on a list for an "in" filter on a query:
``
PrismaClientValidationError:
Invalid prisma.backOrderQueue.findMany()` invocation:...Calling all Developers: share your Thoughts on Prisma Console!
Our Console (console.prisma.io) is the bread and butter of our suite of products outside of the ORM. Accelerate, Pulse, Optimize, Prisma Postgres.. all of these are accessed via our Console.
We're looking to keep it top of the line and to do that we're looking to iteratively improve our UI and UX and would love to get your feedback! It's important to hear about your experiences and perspectives so we can refine our user interface.
Understanding your challenges and successes will help us prioritize what's most important. ...
How to query for is:{null} OR {something: true}
When I want to update a record in a table, for the
where I need to query for a related object and I need to say if the related object does not exist (is null) or a property on the related object is something
psudo code
```ts
prisma.channel.update({where: {lastMessage: { OR: [ {is: null}, {someproperty: true} ] } }, data: {...}})...Accelerate billing
Hi! I'm wondering how Accelerate counts queries for billing purposes. For example if I issue a single Prisma query, e.g.
prisma.user.findMany({ include: { comments: true, posts: true }})
which actually issues multiple SQL queries under the hood, is that billed as a single query or one for each underlying SQL query?...Prisma with pgbouncer behind a load balancer
Hi friends! We are running prisma with pgbouncer behind an AWS network load balancer to handle multiple pgbouncer instances. This generally is working great.
Our problem though is that when we bring up new pgbouncer instances, existing web app processes only use it for new connections (not existing ones) and so load is only actually evenly balanced after a server restart.
Ideally I would want a way to set an idle connection timeout in Prisma in our application so that connections would get recycled if they're not being used, but I don't see any option for that. In fact the only thing that I've found that's related to this is this reference to Zombie connections which implies that Prisma can't do this, but not why it can't....
Prisma Data Platform onboarding issue
Dear prisma team,
I just tried out the prisma data platform and in the onboarding after creating my postgres db, I am redirected on a url that does not exist!
It was this url: https://console.prisma.io/cm4....4e2ot1r4d68zh/onboarding#setupApplication...
Unclosed connections on redeploy
So my stack is fastify with yoga graphql and ofc Prisma. When redeploying app I think that the connection to the db is not being closed as after trying to fix the deployment for few commits (I redeployed the app every time to see changes) I started getting error as in console.

Prisma Schema Pull/Push Issues
Having issues where when i run npx prisma pull, it seems to pull from a certain state of the schema. If I make changes to the schema and do a npx prisma push and then npx prisma pull the schema is not the same.
Database is Supabase (Postgres).
Sorry for the lack of information there really isnt any logs I could find for this....
Mocking prisma client with javascript
How can I mock prisma client with javascript?
The guides I found are heavily depended on typescript...
Solution:
Hi @Osamu
Can you take a look at this repo ? I created a mock example in Javascript using Prisma....
Declaring a PrismaClient with conditional logging
Hi folks! I'm trying to instantiate a PrismaClient in a TypeScript project. I'm using v6.0.1, and have the following code:
```typescript
export class DatabaseClient {
private _prismaClient;...
How to correctly deploy prisma into production?
So Im a bit clueless here, am I supposed to run
prisma generate in my Dockerfile? Im using prisma with nextjs dockerfile and doing:
```docker
ARG DATABASE_URL
ENV DATABASE_URL=${DATABASE_URL}
RUN yarn prisma generate...