Prisma postgress fix
This commit is contained in:
+3
-2
@@ -1,4 +1,5 @@
|
||||
import { PrismaClient } from "@prisma/client";
|
||||
import { PrismaClient } from "~/app/generated/prisma-client";
|
||||
import { withAccelerate } from '@prisma/extension-accelerate'
|
||||
|
||||
import { env } from "~/env";
|
||||
|
||||
@@ -6,7 +7,7 @@ const createPrismaClient = () =>
|
||||
new PrismaClient({
|
||||
log:
|
||||
env.NODE_ENV === "development" ? ["query", "error", "warn"] : ["error"],
|
||||
});
|
||||
}).$extends(withAccelerate());
|
||||
|
||||
const globalForPrisma = globalThis as unknown as {
|
||||
prisma: ReturnType<typeof createPrismaClient> | undefined;
|
||||
|
||||
Reference in New Issue
Block a user