Prisma

P

Prisma

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

Join

Using Prisma nicely with SvelteKit (With Pulse)

I realise this could be asked in either Discord but this feels the correct one. Prisma works beautifully on the *.server.* pages. Absolutely no issue. But the issue I'm having is how to correctly set up the streaming. A Google tells me you can set up Websockets etc so it seems like it should be doable. But I am getting stumped at how to integrate Pulse correctly. Wondering if anyone else has smart ideas?...

multi language setup in prisma

I have a question is there anyway to make a for example a model name hotel_en and hotel_fr and hotel_de dynamically so I can add multi language , or how can I create multi language similar to booking or expedia , trying to understand how big websites generates multi languages.

Issue with prisma

Hi I keep getting this message about OpenSSL when deploying my app to heroku and trying to run it
Solution:
So another user in another discord helped me out and it actually worked. For anyone else who is currently experiencing this issue, this is what solved the problem I added this line just after defining the base image to use...
No description

Working Build to Non-working Build, OpenSSL & Platform Issues, Docker, Linux, Mac

I'm suddenly having issues with creating a new docker image of my nextjs with prisma app. The issues relate to openssl and the wrong prisma binary being built for the wrong environment. I've now wasted half a day so far trying to resolve this issue. What gets me the most though, is that I literally built this project about a week ago without issue and it is running in production. So why can I now not build the same Docker image at the same git ref? ...

Error at adding Prisma 6.0.1 to NextJs 15: can-connect-to-database

I was trying to add Prisma to an existing NextJs 15 project: According to Prisma doc https://www.prisma.io/docs/getting-started/quickstart-sqlite ```bash...

Previously Working Dockerfile No Longer Works

```Dockerfile FROM node:lts-alpine AS base Install dependencies only when needed FROM base AS deps...

Retrieve accurate data

Hi! Hope you're well! I have recipe categories (lasagne, chocolate cake...) that have recipes (vegetarian lasagne, gluten-free chocolate cake...). These recipes have ingredients (butter, eggs...) On the customer's side, I have a selector that allows the user to select the ingredients they want and don't want to have in their search. Example: the user wants recipes that have eggs AND apples, but NO cheese. A recipes with eggs, apples and butter must be displayed. ...

Retrieve user information

I try to create a user and store it in my db from the infomations that the user will enter on login information import { Request, Response } from 'express'; import bcrypt from 'bcryptjs'; import { PrismaClient } from '@prisma/client';...

fullText contradicting errors

PrismaClientKnownRequestError:
Invalid `prisma.user.findMany()` invocation:
Cannot find a fulltext index to use for the native search, try adding a @@fulltext([Fields...]) to your schema
PrismaClientKnownRequestError:
Invalid `prisma.user.findMany()` invocation:
Cannot find a fulltext index to use for the native search, try adding a @@fulltext([Fields...]) to your schema
...

TypedSQL failing during build step

Hey there, I am having an issue where my SQL scripts run perfectly fine during developing but during my build step I am receiving the following error. I am unsure how to begin to debug this issue, so any suggestions are appreciated. ``` Failed to compile. ...

v6 Migration Doesn't Work

I did a baseline for my current db in prisma 5. all in sync, all good. I think updated prisma and @prisma/client to v6 then i ran npx prisma migrate dev --name upgrade-to-v6...

Why can't we connect directly to postgres ?

Hi, Using NExtJS 15 and Prisma connected to a simple postgresql database, I don't understand why something that worked before needs now an extra adapter ot using accelerate ? I just want to connect simply to a database for a small app that will not have that much users and concurrent connections....

CreateMany not allowing me to create nested M:N entities

I've got a situation where this query works: ```ts await prisma.item.create({...

AWS Connection

hello there, im using aws to deploy my backend, and vercel for my frontend, for some reasons in localhost it will work to fetch data from my backend, but in my vercel cliney deploy i get this error Mixed Content: The page at 'https://{url}/contacts' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://{url}/api/v1/contacts/details'. This request has been blocked; the content must be served over HTTPS.. i have tried using NGINX with my public IP but it still wont work. how to fix that?...

Optimize in a Constructor

I use prisma in a nest.js api and instantiate a globally used version in a constructor - I've been trying to get optimize to work, and while the console log says it is set up and good to go, no data ever flows through. It looks like this - any idea what I'm doing wrong, or how to do this correctly? ```Typescript export class ApiCoreDataAccessService extends PrismaClient implements OnModuleInit, OnModuleDestroy { public queryCount: number...

Simple questions about modularity

Hi, I am re-structuring my code and I wanted to ask if it makes sense to put al lot off common prisma queries within function, e.g. in a simple getBalance function where I need the account data, I could make an accountService and make the code a bit cleaner in my eyes. Does this makes sense, it's my first big project, and I want to do some best practices cause the code needs to be adaptable with the future in mind. I would appreciate any quick feedback on this from someone more experienced!...
No description

Postgresql freezing, have to restart the app to unfreeze

Hello, I am using NestJS + Prisma + PostgreSQL to develop my app, I am having problems which I can't find cause of issues yet, my app is freezing Postgresql so I have to restart the app to unfreeze, how can I avoid it atleast it must not freeze PostgreSQL

Property 'xxx' is missing in type with relation

Hello, I am new to the prisma ecosystem and I am having a hard time understanding how it works. Here is my current .prisma file structure: ```d model GroupGraphics { groupId Int @id...

Memory leak on binary engine type

I think prisma binary type might have some emmory leak. I have been running my prisma app for over a year now and had memory leak but could not find reason. Yesterday removed binary engine type and it seems to fix the issue.
No description