unexpected message from server
Hi all, we see this error pretty randomly
error in connector: error querying the database: unexpected message from serverI try to replicate with the same query, but the error persists. Is this the kind of error wherein it makes sense to implement some kind of retry logic?...
Accelerate SWR option not re-fetching/revalidating cache
If my understanding of the SWR strategy is correct, the cache is supposed to be revalidated after each request (even if the cache served old data).
In my user profile component, I'm fetching the user's information from the database. When an update gets made (e.g. the user's name), refreshing the page still displays the old information. I would expect this to be the case for the first couple refreshes after the update has been made (since the cache is being revalidated/refreshed in the background), but even after a full minute the query result keeps returning the old user information.
Why is the cache not being revalidated/refreshed in the background??...
Types are broken because of read replicas extension
I am exporting this singleton in my whole application
```ts
const prisma = new PrismaClient({
log: ['info', 'error', 'warn'],
}).$extends(...
How do I go about seeding with the D1 adapter?
Hey all, I have recently started using the D1 adapter and I am a bit confused around how seeding should be handled. Initially I thought it would be the same as other DB's so I was following the guide here: https://www.prisma.io/docs/orm/prisma-migrate/workflows/seeding#seeding-your-database-with-typescript-or-javascript. The issue is when using the D1 adapter it requires a binding to the D1 database instance which comes from the Cloudflare workers context. Since the seed script would run outside...
Sort by nulls
Is there a way to sort and not show nulls or empty strings? I added last: null, but it doesn't work :
```ts
this.prisma.toSource.findMany({
where,...
Prisma Enum Mapping
I have this enum in my
prisma.schema is there a way for me to map it the same way as I map in my schema?
```ts
enum CombatCategory {
TANK_MELEE @map("M1")...
Prisma schema folder
Hi. Today I upgraded Prisma to latest version i.e. from 5.8 to 5.16. But my docker setup is not able to find prisma schema file. I had to add following line to make it work
COPY ./prisma ./prisma
I can't understand why it is needed now and was not needed before....

Prisma.io Console 500
It looks like there's issue with 500 errors when turning on prisma pulse. Once we enable it the project starts throwing 500 errors. I saw there was some issues this morning. Is this still something that is happening?

Error using PrismaClient with Cloudflare Pages
I'm successfully using Prisma with a CF Workers project using the adapter like this:
...
const prisma = new PrismaClient({ adapter: new PrismaD1(c.env.DB) });
const prisma = new PrismaClient({ adapter: new PrismaD1(c.env.DB) });
How can i get the change the return type of a prisma function based on a generic type?
This code works, but if I change the include parameter it doesn't get reflected in the return type of "prisma.user.findFirst". I know this is more of a typescript question but maybe some of you guys have solved this before?
```ts
export async function verifyAuth<I extends Prisma.UserInclude>(token: string, include?: I) {
return prisma.user.findFirst({...
$queryRawUnsafe takes a long time to respond
Hi !
I have a problem with an SQL query. I'm on a MySQL database, and I'm doing a select with 5 joins via a $queryRawUnsafe, and the query takes 40 seconds. When I use mysql2 or MySQLWorkbench, it takes 4 seconds. I wanted to know if there was a reason, and if there is a way to correct this latency.
prisma version: 5.15.0...
Include in findone return null if the join table not have its id
I have table "sometable" and "purchase_items" table. in purchase_items, i have sometable_id. im trying to include purchase_items in findOne purchase_items. it works when purchase_items have data with sometable_id, but it return null when
example: sometable has id = 9, but purchase_items has no sometable_id = 9.
i want to still get the data, with purchase_items: []. is it posible?...

Definitive Solution for automatic migration running?
Hey there! I want to use Prisma in an open-source application others can deploy on their own servers.
I want the user to not worry about having to run any migrations, especially after updates, etc.
What would be the definitive solution to make my app ensure that it's always on the latest state regarding migrations on launch?
I've seen quite a few solutions, such as a wrapper that runs migrate and then launches the app, but that seems kind of hacky, so I was wondering if there's something better?...
please help me to setup prisma for my ds ticket bot
i have this messeges from my ds bot:
[ERROR] Error: @prisma/client did not initialize yet. Please run "prisma generate" and try to import it again. In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues at new PrismaClient (C:\Users\Roma\Downloads\bot-main\node_modules.prisma\client\index.js:5:11) at Client.login (C:\Users\Roma\Downloads\bot-main\src\client.js:93:17)...
Help: squashing migrations
I'm trying to squash my migrations into one migrations and I was wondering if we are surpose to remove all contents in the
.prisma/migrations folder including the migration_lock.toml?Using upsert when `Notifications` table doesn't exist yet for user
I have a query to update a users notification preferences, but there's no data existing data yet inside the table. How can I change the query to accodomate that?
``` await prisma.notifications.upsert({
where: { id },
data: {
type,...
Initial find query giving weird error
Hey guys, for some reason every time I try to register, I get this error:
``
Invalid db.user.findUnique()` invocation
1 const db = require('./prisma');
2...
