Prisma

P

Prisma

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

Join

Can I access a database, which was created with prisma, with a normal sql driver?

I can connect to my database using sqlx in rust and fetch data, but when I try to insert data I'm getting an error
Created: Err(Database(PgDatabaseError { severity: Error, code: "42601", message: "syntax error at or near \"#\"", detail: None, hint: None, position: Some(Original(55)), where: None, schema: None, table: None, column: None, data_type: None, constraint: None, file: Some("scan.l"), line: Some(1244), routine: Some("scanner_yyerror") }))
Created: Err(Database(PgDatabaseError { severity: Error, code: "42601", message: "syntax error at or near \"#\"", detail: None, hint: None, position: Some(Original(55)), where: None, schema: None, table: None, column: None, data_type: None, constraint: None, file: Some("scan.l"), line: Some(1244), routine: Some("scanner_yyerror") }))
My schema looks like this:...

Manually rollback in transaction

Does prisma have a method to manually initiated a rollback inside a transaction without throwing an error?

hello guys , i have a quetion about sorting in relational field in prisma , i have the below models:

hello guys , i have a quetion about sorting in relational field in prisma , i have the below models: model speciality { id String @id @default(uuid()) medical_Files medical_File[]...

Postgresql 17

Hello, Does prisma work with Postgresql 17? In docs it mentions only 16, but at first glance I don't see any breaking changes that may affect prisma....

Fix a query

is there something wrong with this query, it isn't working? ```ts await prisma.collection.findFirst({ where: {...

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