Prisma

P

Prisma

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

Join

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.
No description

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...

Type Issues with Client Extension in Nest JS

Hello, I am trying client extension with my nestjs application. But I am facing some type issues, can you help me. here is my code. ```ts import { Logger } from '@nestjs/common';...

Issues with shared library libssl.so.1.1

I tried installing it manually but it did not resolve the issue as the library was not found, i tried updating my docker version to a previous one that did not work either, and my pipeline has not changed since the morning where the issue had not been present but now suddenly is.
No description

Studio is not working with multifile schemas

I have created a folder schema and added the following code to the schema.prisma file ```js datasource db { provider = "sqlite"...

node:20-alpine OpenSsl deployment issue

Hi all! I have been having the openssl issue with my node:20-alpine Dockerfile. Here is the Dockerfile: ``` FROM node:20-alpine AS builder ENV TURBO_TEAM=...

default data using prisma

const specialities = await this.prisma.speciality.findMany({ include: { specialityLabel: { where: { language: 'fr'}}...

Error @prisma/client did not initialize yet. Please run "prisma generate" on gitlab-ci.yml

hello im using bun.sh and prisma on my project , when im create ci/cd for deploy to my server i got an error Error @prisma/client did not initialize yet. Please run "prisma generate" `# Stage 2: Build application build: stage:...

ERROR: could not determine data type of parameter $5

Hi, I'm trying out the TypedSQL feature, but I'm receiving an error when trying to generate prisma with --sql. Can anyone spot what I'm doing incorrectly? ```sql -- @param {Int} $1:userId -- @param {Int} $2:parentEntryId -- @param {Int} $3:pageSize...