Prisma

P

Prisma

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

Join

Failed to parse config file at "./prisma.config.ts"

Following the D1 guide here https://www.prisma.io/docs/guides/cloudflare-d1. When trying to migrate by running npx prisma migrate dev --name init, I get the error failing to parse the config file

AWS Amplify Gen 2 Error Client

Hi, Im tryin to use prisma in my Amplify Gen 2 Function, the binaries are created correctly in local (Mac M4) but when I do npx ampx sandbox and execute the function I receive the following error: Invalid prisma.avisos_de_marca.upsert() invocation: ...

Prisma causing app crashes

We use prisma 6.13.0 in our node (v22) server and recently have been seeing an issue where some query would fail crashing our server. We suspect it might have something to do with prisma as we see an double free or corruption (out) error right after our server restarts leaving us to think that it's related to some binary and not our node server. Prisma is pretty much the only thing we have there with a binary running. It seem to have began a bit after we started doing some raw queries with prisma. We also run some background jobs with pgboss that touch some prisma queries as well and we think that could be part of it too. Do you have any insights on what could be the root cause of the double free or corruption (out) error?...

Need Shadow in Prod?

We are self hosting an Encore.ts app and therefore have to run npx prisma migrate deploy in a seperate container before we start our app. Do you know if we need the shadow db for Prisma to work in prod? Or is that just a local concept?

Can't prisma generate

D:\Blog>yarn prisma generate Environment variables loaded from .env Prisma schema loaded from prisma\schema.prisma Error: Could not resolve prisma and @prisma/client in the current project. Please install them with yarn add prisma -D and yarn add @prisma/client, and rerun yarn dlx "prisma generate" ๐Ÿ™....

Handling sqlite locally and d1 production db?

How do I handle these two environments?

Need to clarify where to import Prisma from

In the past the prisma client was generated inside node_modules. So I always imported everything from @prisma/client. But now since the Prisma Client is generated in a custom path outside node_modules I should be importing it like this right? I am using Next.js and according to this page I create the Prisma Client instance like below. This is the correct way right? Instead of importing the PrismaClient from @prisma/client like we did in the past now I import it from the generated output? ```ts import { PrismaClient } from "../generated/prisma"...

Prisma generate error

Is it just me or is this happening to everybody. Using prisma has been returning errors lately, now on multiple databases - Cockroachlabs and now Cloudflare: ``` Shell npx prisma generate [in d1-api-worker] (Generate prisma client) Prisma schema loaded from prisma/schema.prisma
Error: Could not resolve @prisma/client despite the installation that we just tried. Please try to install it by hand with npm i @prisma/client and rerun npx "prisma generate"๐Ÿ™. ...

Question about Prisma Migrations and "public" Schema

Hi! I noticed that in my recent Prisma migrations, the generated SQL now includes "public"."table_name" for table creation and foreign keys, but in my older migrations, it was just "table_name" without the schema prefix. I havenโ€™t changed anything in my schema.prisma regarding schemas. Why does Prisma now add the "public". prefix in migration SQL? Is this a new default behavior in recent Prisma versions? Is there any impact or best practice I should be aware of?...
No description

Errors with transaction

Hi, i've facing a lot of prisma errors with transactions and connection pool. My environment is: - PostgreSQL on GCP, connection string parameters: ?connection_limit=50&pool_timeout=20 - Default connection with prisma client....

Rust-free ORM still download engine binary

Hello ๐Ÿ‘‹ Some (important) context first: I'm developing a Prisma-powered project and I'm switching between 2 laptops:...

Embedded studio question

Does the embedded mode work with every db or just ppg? Are there any examples for different ones, and would you mind pointing me to the resources if any (besides the ppg reference demo)?

Can't connect Prisma Accelerate to MySQL on Railway

I'm trying to connect Prisma Accelerate to a MySQL database hosted on Railway, but I keep running into issues. When I use Prisma normally (without Accelerate), the connection works fine using this URL: mysql://[user]:[password]@auto.proxy.rlwy.net:44574/mydb ...
No description

prisma skips environment variable loading with config file?

is there a way to pass the environment variables in the config file https://www.prisma.io/docs/orm/reference/prisma-config-reference instead of using dotenv(). this originally automatically worked specifying the env varible in schema.prisma but breaks with the config file

Prisma Accelerateโ€™s Ghost Cache: Refusing to Drop UUID+Email for Int+Username

Iโ€™m wrestling with a stubborn spirit in the pool that wonโ€™t let go of my old schema. Hereโ€™s the saga: Environment DB: Neon PostgreSQL (pooled URL, sslmode=require) ...

Generated Prisma Client

Hi, I've recently tried to move to generated prisma client but got stuck with lot's of typescript errors mostly to lack of infering (I guess). I needed to type few things myself but I am still strugling with others. For example I am using trpc, I have trpc prodedure names protectedProcuder that ensure that user is authorized to access. Inside I use some prisma calls and got this error: "The inferred type of 'protectedProcedure' cannot be named without a reference to '../node_modules/@acme/db/dist/generated/prisma/enums'. This is likely not portable. A type annotation is necessary." ...

How to use connect with relations in Prisma (normal case explained)

I can't understand why some time connect work and some time not. I can't understand how and when it work? Please help me. In user connect work properly but in institute the connect not work for address.
No description

Error validating datasource `db`: the URL must start with the protocol `prisma://` or `prisma+postgr

Attempting to run e2e tests in a docker environment against a standalone nextjs server container. I use prisma accelerate in production, but for tests these will run in a server environment - so accelerate is not desired. I am working on a dynamic build and runtime that allows for dynamically using accelerate depending on the environment, but for debugging this issue I've simplified things and I've removed prisma accelerate completely from this branch to try and isolate the cause of this issue. This error is appearing in both 'test' and 'development' environments, also from Cypress runtime. But the db url is valid, the db is up, and I'm not using accelerate, i'm generating with --no-engine=false. So I don't understand why prisma is trying to use accelerate. Is there some way to have prisma print out why it's attempting to look for an accelerate url? error log...

Migrate to Prisma Postgres

How is the easiest way to migrate my current postgres to a prisma postgres (already use prisma as orm)? Is there a way to import a backup file or whatever?

How do I setup different database environments using the Vercel integration

I saw your blog post about Platform Environments, and enabled the feature on my project. But it seems that it's expecting a remote database; and I was expecting it to create a new DB. How do folks typically create a production and pre-production DB environments to work with Vercel? My fallback is just to integrate a new project for each environment....