Prisma

P

Prisma

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

Join

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

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