mirror of
https://github.com/AustinKelsay/plebdevs.git
synced 2025-06-05 00:32:03 +00:00
Revert
This commit is contained in:
parent
523eaf5b6a
commit
10285a82e6
@ -7,7 +7,6 @@ datasource db {
|
||||
provider = "postgresql"
|
||||
url = env("POSTGRES_PRISMA_URL")
|
||||
directUrl = env("POSTGRES_URL_NON_POOLING")
|
||||
relationMode = "prisma"
|
||||
}
|
||||
|
||||
generator client {
|
||||
|
@ -7,21 +7,7 @@ let prisma;
|
||||
// If not, create a new instance of PrismaClient and attach it to the global object.
|
||||
// This ensures that the same instance of PrismaClient is reused across multiple invocations.
|
||||
if (!global.prisma) {
|
||||
global.prisma = new PrismaClient({
|
||||
datasources: {
|
||||
db: {
|
||||
url: process.env.POSTGRES_PRISMA_URL
|
||||
}
|
||||
},
|
||||
// Add connection pool configuration
|
||||
connection: {
|
||||
pool: {
|
||||
min: 0,
|
||||
max: 1,
|
||||
idleTimeoutMillis: 5000
|
||||
}
|
||||
}
|
||||
});
|
||||
global.prisma = new PrismaClient();
|
||||
}
|
||||
|
||||
// Assign the global PrismaClient instance to the prisma variable.
|
||||
|
Loading…
x
Reference in New Issue
Block a user