Prisma

P

Prisma

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

Join

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

Use statically linked prisma binary (linux-static-x64)

I want to use a staticailly linked binary (linux-static-x64) but it doesn't work as I'm getting this error:
45.22 Error: Failed to fetch sha256 checksum at https://binaries.prisma.sh/all_commits/5dbef10bdbfb579e07d35cc85fb1518d357cb99e/linux-static-x64/libquery_engine.so.node.gz.sha256 - 404 Not Found
45.22 Error: Failed to fetch sha256 checksum at https://binaries.prisma.sh/all_commits/5dbef10bdbfb579e07d35cc85fb1518d357cb99e/linux-static-x64/libquery_engine.so.node.gz.sha256 - 404 Not Found
...

db Pull not pulling schemas

When I am doing a prisma db pull in a file that I have about 10 schemas defined in the schema file ```js datasource db { provider = "sqlserver"...

Prisma using repository pattern

What do you think about using prisma with a repository pattern to encapsulate the logic?

React Native Prisma TurboModuleRegistry error

I am trying to create an app with React Native using Prisma. When I try to open the application on my Android phone I get an
Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'Prisma' could not be found. Verify that a module by this name is registered in the native binary.
Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'Prisma' could not be found. Verify that a module by this name is registered in the native binary.
...

Recommended pgbouncer usage for pgbouncer version > 1.21.0

Hi, I am using Prisma with Azure Postgres - Flexible Server. As my app is deployed on Vercel, I want to use pgbouncer. However, I seem to be encountering some issues. As per the docs, I have not set pgbouncer=true since the default version on Azure is 1.22.1 I am currently using DATABASE_URL and DIRECT_URL with the only difference between the connection strings being the port number (6432, 5432) respectively (no &pgbouncer=true)...
No description

Performance problem

Hi all! We have a problem with performance. We use prisma 5.21 and I measure time for a call where we get a batch of 50 objects and the response is about 800kb. Currently it takes about 1.9s to get the response from prisma. Does that sound reasonable? Any ideas on where I should start troubleshooting? My code below: const recruitments = await prisma.recruitment.findMany({...

"upsertMany" with transaction timing out

I'm trying to build a database containing stock for different products from our suppliers. The stock can be fetched as a csv file from an FTP server. What I want to do is to periodically (every day) run a script that gets the csv file, parses it, and insert the values to a database. It should also save the previous history of the stock. This is the code that I have currently. ```ts...
Solution:
I switched to postgresql and now everything works as intended and a lot quicker!

field reference help

hello I have models like this ``` model Player { team Int[]...

Many-to-many relationship not showing in prisma studio?

This is my prisma schema: ```prisma model Track { album Album @relation(fields: [album_id], references: [id]) artists Artist[]...
No description

types from @prisma/client

model User { id String @id @default(cuid()) username String @unique password String createdAt DateTime @default(now())...

Prisma migrate dev keeps wanting to drop my sequence

I created an empty migration file, added my sequence in. After that I ran migrate dev which will generate the sql necessary to insert my column orderNumber Int? @unique @default(dbgenerated("nextval('order_number_seq')")) It creates the sql for inserting that column...

All queries hanging in simple edge deployment on Cloudflare with Neon

All queries that I've tried are hanging when running in Cloudflare Workers with Neon as my backend. I've opened an issue here https://github.com/prisma/prisma/issues/25803 that contains a repo with a repro. I've also confirmed that using NeonDB directly works fine, so I'm currently thinking it's a Prisma issue. Opening a discussion item here as well in case anyone here has run into this and has a work around!...

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