Prisma

P

Prisma

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

Join

When running Prisma Generate on either of my computers (both Apple Silicon) getting error

Can't find anybody else that is experiencing this so maybe I've done something silly,but whenever I run prisma generate I get this error: ``` Error: Generator "prisma-json-types-generator" failed: ...

Prisma is not working while deployed on Vercel with Vercel Postgresql but working in Development.

Here is my schema: ``` generator client { provider = "prisma-client-js" }...

Storing image metadata: Is this safe?

So I am building a backend for smart city application, and I found myself lost in thought on is this realy make sense to have this much optional foreign key. I know that foreign key can be optional but this many seems kinda inefficient? or am I just overthink stuff that I shouldn't overthink.
No description

Prisa Query doesn´t find the data in my DB

I have this Schema ```js model CapitalRaids { id Int @id @default(autoincrement()) clanTag String...
No description

A big 2M wasm file created after implementing prisma

I'm using NextJS combining with (Prisma + D1 Adapter), I don't know why Prisma produced such a large wasm file resulting in a build failure in Cloudflare pages.
Solution:
That’s correct, yes. The file is our query engine. You can learn more about that here: https://www.prisma.io/docs/orm/more/under-the-hood/engines
No description

opensaas

Hi all, I'm new to Prisma and very excited to start. I have created an instance of opensaas which connects to postgresql via Prisma. Does anyone know if any Prisma instructions have to be modified when using with OpenSaaS or is everything just standard Prisma. Many thanks...

One of two fields (or both) must be provided.

how to defina a constraint that one of two fields (or both) must be provided but they can't be both null

Getting P2024 all of a sudden without any unusual activity or usage spike

Hi, We've suddenly started receiving the error P2024 in our prisma setup (we also have prisma accelerate) seemingly out of the blue. I've checked that there is no sudden load (in-fact load is slightly less than usual right now) ...

studio

Hi everyone, I've successfully connected my database with Pulse on the Prisma Data Platform. However, I'm unable to find the link to access Prisma Studio online. Could someone guide me on how to locate and use Prisma Studio with my connected database through the Prisma Data Platform? Thanks in advance!...

Three Way Relationship ConnectOrCreate

I have the following mode: model Bean { id String @id @default(uuid()) country OriginCountry[]...

how to make a model with any type

can i have this below mongoose model in prisma ``` import { Schema, model } from 'mongoose'; const CatalogSchema = new Schema<any>({}, { timestamps: true, strict: false });...

Invalid `prisma.course.create()` invocation:

i have this error when i create a schema in next js 14: import { NextResponse } from "next/server"; import { auth } from "@clerk/nextjs/server"; import { db } from "src/lib/db";...

Problem with Prisma , Docker , Postgres and PgAdmin

when I run npx prisma migrate dev I get this (first image ) here is my DATABASE_URL="postgresql://moncef:moncef@postgres:5432/imenu-db?schema=public" and my docker-compose.yml file : ```yml version: "3.8"...
No description

Prisma git ops deployment

Hi All, I'm looking into using prisma to define our db schema and I'm wondering what the best practices / tools are for doing git-ops. I want to make sure that when I update the schema in the codebase, the db schema is automatically updated. It looks like prisma migrate kind of does this, except it doesn't cover the init case (if I understand correctly). How do I initialize the db (obviously I could connect and run something locally, but this isn't good because then my schema doesn't have to be reviewed before I init the db)? https://www.prisma.io/docs/orm/prisma-client/deployment/deploy-database-changes-with-prisma-migrate...

Can't start prisma studio

Hi! After updating Prisma, I've just noticed that I cannot launch Prisma studio. I'm using LibSQL and the libsql adapter. I'm on versions 5.15.1 for prisma, @prisma/client, and @prisma/adapter-libsql, and when running bun x prisma studio, there is no console output. Thanks for any help!

Unable to find table (not available) but it exists

The table (not available) does not exist in the current database. code: 'P2021', clientVersion: '5.7.0', meta: { modelName: 'DraftItem', table: '(not available)' } I can GUARANTEE you that DraftItem exists. Doesn't happen for other tables, happens to multiple devs, seems to work fine once its deployed.. our running app works fine. Its just connecting to the dev database locally that it doesn't work. ...

Did Prisma.raw and Prisma.sql helpers get removed?

I'm working on writing a new extension. In my code, I use the .raw and .sql helpers/methods. For example query = Prisma.raw(`${query1}${query2}`). For Prisma 5.14 this works fine, but not in 5.15.1. I initially found it while updating lint, so thought the Property 'raw' does not exist on type 'typeof Prisma'. error I'm seeing in the IDE may have just been cruft. But, in fact, when testing in a real client, it no longer works: Error: Prisma.raw is not a function. This usage is still i...

Prisma Nuxt RollupError

Hello, I am trying to use @prisma/nuxt, but after installation and when I run npm run dev, it results in the error ```ℹ Vite server warmed up in 3864ms 9:33:51 AM ℹ Vite client warmed up in 5284ms 9:33:52 AM [9:33:52 AM] WARN [plugin inject] node_modules/.pnpm/@prisma+nuxt@0.0.30_magicast@0.3.4nuxt@3.12.2@opentelemetry+api@1.9.0_@parcel+watcher@2.4.1_2uyq5cr4225ns57lx4llpfiydq/node_modules/@prisma/nuxt/dist/runtime/server/utils/prisma.d.ts: rollup-plugin-inject: failed to parse /home/joe/novaint/node_modules/.pnpm/@prisma+nuxt@0.0.30_magicast@0.3.4nuxt@3.12.2@opentelemetry+api@1.9.0_@parcel+watcher@2.4.1_2uyq5cr4225ns57lx4llpfiydq/node_modules/@prisma/nuxt/dist/runtime/server/utils/prisma.d.ts. Consider restricting the plugin to particular files via options.include ...

Random findMany is not a function errors

Sometimes randomly, prisma is throwing an error: prisma.profile.findMany is not a function. Once i restart the application, it starts working, but again after sometime the error comes up I'm using Prisma with NodeJS Express server....