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