Prisma

P

Prisma

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

Join

Prisma Transaction type error

I'm getting this weird type error on a Prisma transaction https://files.arxk.io/u/8pG9CR.png...

Prisma creates invalid migration when removing an index

theres a issue on github #26251 about a migration that duplicates a previous foreign key constraint name. that makes you need drop all data. There some way to fix without use relationMode as prisma?

Update ad whose apartment has m2m relatioship with contents through apartment_contents join table

I want to implement an edit function for ad. I don't want to update contents themselves, but replace apartment's relationships with contents with a new one.

Prism Sync

I have a server A and a server B. They have different functions but use the same database (schema) The problem is the synchronization of migrations, so when I do it on server A, B starts to have problems. Has anyone experienced this, or does anyone know if there is a way to maintain synchronization?...

findMany() vs findMany({...})

```js // src/lib/db/db.ts import { PrismaClient } from '@prisma/client'; const globalForPrisma = global as unknown as { prisma?: PrismaClient };...

Prisma Pulse w/ Docker Postgres

What's the nicest way to get Pulse working with a local DB in docker? Ideally a situation where I wouldn't have to manually enable WAL, it would be set up when the container comes up.

Backing up data with Prisma Postgres

What is the recommended approach for backing up data with Prisma Postgres? Historically I've used pg_dump but after migrating to a Prisma Postgres db, the database url uses an api key instead of a user/pass combo and pg_dump is saying I have an invalid param (api_key)

Seeding database with pnpm

I followed this tutorial and I'm using SQLite, but now when I run my Next.js app (pnpm run dev), a dev.db file is created, but it's not seeded. I assume it's normal for a new database to be created for each app, but how can I make sure it's seeded ?...

Run Prisma In 2 different Process's

Gm/Gn PrismaClient: prisma-py DB: sqlite:file ...

Recommended setup for Prisma with Supabase Auth

Morning team - looking for some industry standard suggestions on hooking Prisma up to Supabase when using Supabase auth. Right now I have a user table in my public schema, and a trigger that creates a new user row whenever a signup on supabase auth occurs. I tried havint the FK relationship established, but this feels overly problematic. Would it be best to just trust the trigger assigns the same UUID on the user table? ...

Hi guys. I've been using prisma for my projects and this time I have a weird issue:

I keep getting: Can't reach database server at 123.j.db.ondigitalocean.com:25060 Please make sure your database server is running at 123.j.db.ondigitalocean.com:25060. ...

node_modules/.prisma/client/libquery_engine-debian-openssl-3.0.x.so.nodels: cannot access 'node_mod

I'm trying to deploy a Web Application to Azure using Node.js 20 and Prisma 6 through GitHub Actions. However, during the deployment process, I am encountering the following error: node_modules/.prisma/client/libquery_engine-debian-openssl-3.0.x.so.node ls: cannot access 'node_mod ...

How do I get the count in nested relations.

Here I am trying to retrieve comment count for every post. How would I go about it? ``` const posts = await prisma.posts.findMany({ where: {...

Can't connect to supabase using prisma

```js npx prisma migrate dev --name init Environment variables loaded from .env Prisma schema loaded from prisma\schema.prisma Datasource "db": PostgreSQL database "postgres", schema "public" at "aws-0-us-west-1.pooler.supabase.com:5432"...

Prisma uuidv4 Error creating UUID, invalid length: expected length 32 for simple format, found 24

For some reason I keep continue getting for almost 2 days now the following error: ```ts ..... code: 'P2023',...

Silent and Stalled transaction

This is a strange one. I have a transaction running in a child process (worker). The transaction uses a temporary table to insert a bunch of ids to do an efficient join on a very large dataset. The code for this looks something like: `` const remoteIdsSql = ids.map((id) => Prisma.sql(${id})`); const postgresDriverParamLimit = 32767;...

Converting a query to use TypedSQL

```ts prisma.$transaction(data.map((match) => { return prisma.match.update({ where: { matchId: match.id,...

IDE massive performance downgrade from 6.2.1 (omitApi problem?)

I was wondering what was causing my VSCode intellisense and CodeFormatting to be so slow lately. Intellisense was taking and average of 5 seconds to display accross my project. I found out that if I downgrade to 6.2.0 everything is restored and working fine. If I install 6.2.1 or later my intellisense is agonising after regenerating my schema. I'm using SQL Server and rely on prisma db pull and prisma generate to create my schema....

nexus-prisma support for prisma v6

Hi guys. I am trying to upgrade to version 6, but it seems that nexus prisma doesn't support v6. It's a warning, so I am not sure if we can use it wuth version 6. Any help? [email protected] does not officially support @prisma/[email protected]. The officially supported range is: ^5.0.0....

Issues connecting

Is anyone else having issues connecting to their db suddenly? in the last hour or so prisma studio won't load and i'm getting a p6000 when trying to upsert in code.
Next