Prisma

P

Prisma

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

Join

prisma accelerate + custom directory

I need help with prisma acellerate + custom directory the withAccelerate method imported from @prisma/extension-acellerate import from the @prisma/client directory and not the custom directory, which then fails as the module does not exist. How do I change this?...

Custom database_url from command line?

Hey is it possible to run "npx prisma migrate deploy" with a custom database_url? I want to deploy my migrations from my azure pipeline but i dont want to use my .env for my prod database_url...

can I use prisma with Mongodb for real time data fetching ?

I am creating ad feature like google ads, wants to run ads in queue 1 by 1 after each 2 minutes. But with Next.js 14 serverless api and Mongodb I don't think its possible. Can we build this using prisma. Like all users will see same advertisement in real time in queue...

Filtering time

I am using mysql db with prisma this are the fields in my schema ``` time_from DateTime @db.Time(0)...

Prisma filter variable in given array

I have an array position:["GK","CDM","CF"] and I have a model Player { id Int @id @default(autoincrement()) name String ...

Authentication error while fetching data but not while prisma studio or db push

I am getting an authentication error in prisma saying the credentials are not valid while fetching some data in nextjs. but I can use "prisma db push", prisma studio with the same credentials. Can anyone help?
No description

P1017: Server has closed the connection.

Im using nextjs prisma and mysql , when i try to use command "npx prisma db push" i get this error heres my github, i have included my env file https://github.com/Raunak0713/quiz...
No description

What's the correct way to fix this error?

I deleted my products table with almost 3 million records using DROP TABLE products CASCADE;. Then, when I tried to recreate the table with npx prisma migrate dev, Prisma raised these errors: ``` [-] Removed tables - products...

children and favourite child (ambiguous relation)

I want to model a relationship where a parent record can have many children but there is also a 'favourite' (or 'current favourite') child out of the list of children indicated by an id reference in the parent, to the child. I realise that this is a bit of a circular relationship and care will need to be taken when removing children or changing the favourite but I think the efficiency in query performance is worth the effort. Here is a contrived example... ``` model Parent { id Int @id @default(autoincrement()) ...

prisma migrate reset --force

Hi, I'm a prisma user. I am running prisma migrate reset --force to configure a test environment. However, even though I set the --force option, I am getting the following input window. Why? 'Are you sure you want to reset your database? All data will be lost.' (y/N)...

Need urgent support from Prisma team

Hi, Our production app on accelerate is breaking with an unknown error from Prisma, can someone from Prisma help asap? This is super critical for a new client launch today. Our DB is completely fine. We are unable to interpret the error as well {...

How to get the type of a compound query?

how would i get the type of this? ```ts const commentsPromise = prisma.urlComments.findMany({ where: {...

Support case insensitive advanced Json filtering

There is no support for case insensitive advanced JSON filtering on Prisma When we can expect Prisma to solve this, it would be a really good feature! ``` { applicantData :{...

How good is Prisma with Json fields?

I'm struggling to decide which DB to use with Prisma for Json objects? I will need to have filters for fields in Json object which looks like this, it has many fields... my questions are: is Prisma good for handling Json objects and would it be better to use MongoDB instead of Postgre? details: { attacking: {...

Prisma optimization

Hi everyone, i have a postgresql db with a table named Pricing, it contains arouned 35 columns (string and numbers), + and id, an enum and an index for the company_id related, without one to one relation For one specific company_id, it gives me around 1 milllions rows that i have to display on my frontend (100 per 100 with the pagination) My problem is that it lasts at least 1 min to display the data, it's too much, any idea how to improve the db ? ...

Timezone error

is anyone know how to solve the timezone error in sqlserver? when i query the data it will auto add 8 hour to datetime...

prisma aggregateRaw, how to parse Date back to javascript date, and other special types,

Unfortunately I've been forced to use aggregateRaw because I run into memory limits that requires the "{ allowDiskUse: true }". How can I either: 1) Add this option to regular queries or...

Deployment to vercel failing

I have accelerate activated, i can't deploy to vercel i always get this bug please help (im using mongodb/nextjs) this is my package.json ```json "scripts": { "dev": "next dev --turbo", "build": "next build", "start": "next start",...
No description

Using pulse in a next.js project

I have a next.js project that I deploy in lambdas serverlessly, I want to understand how I can implement in the best way pulse subscriptions in an application that's deployed in this manner

To many database connections ope

Hey, so im working on a nextjs app router. When deploying the app it says, Too many connection opend. Yes im using prisma client best practice, and yes after every connection im using prisma.disconnect. also yes im using more that one connection in one place but im using await and after every query im disconnecting it, so what can i do...
No description