From d3084cc74feb5e105f07787ef385d0c8b85bc0c7 Mon Sep 17 00:00:00 2001 From: Niels Kaspers Date: Wed, 22 Apr 2026 09:10:33 +0300 Subject: [PATCH] docs(docs): fix const reassignment in v7 upgrade Metrics example The totalQueries counter example in the "Metrics removed" section declared `total` with `const` but reassigned it inside `$allOperations`, which throws `TypeError: Assignment to constant variable` at runtime. Change `const` to `let` so the example actually runs. Closes #7810 --- apps/docs/content/docs/guides/upgrade-prisma-orm/v7.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/docs/content/docs/guides/upgrade-prisma-orm/v7.mdx b/apps/docs/content/docs/guides/upgrade-prisma-orm/v7.mdx index fab5145120..664840fd57 100644 --- a/apps/docs/content/docs/guides/upgrade-prisma-orm/v7.mdx +++ b/apps/docs/content/docs/guides/upgrade-prisma-orm/v7.mdx @@ -292,7 +292,7 @@ If you need this feature, you can use the underlying driver adapter for your dat For example, a basic `totalQueries` counter: ```ts -const total = 0; +let total = 0; const prisma = new PrismaClient().$extends({ client: { $log: (s: string) => console.log(s),