mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-18 19:32:21 -06:00
feat(database): add pgbouncer support and optimize postgres config
- Add pgbouncer service to handle connection pooling - Update database connection URIs to support direct and pooled connections - Optimize postgres configuration with better memory settings - Update prisma schema to support directUrl connection
This commit is contained in:
@@ -9,8 +9,9 @@ generator client {
|
||||
}
|
||||
|
||||
datasource db {
|
||||
provider = "postgresql"
|
||||
url = env("DATABASE_CONNECTION_URI")
|
||||
provider = "postgresql"
|
||||
url = env("DATABASE_CONNECTION_URI")
|
||||
directUrl = env("DATABASE_DIRECT_CONNECTION_URI")
|
||||
}
|
||||
|
||||
enum InstanceConnectionStatus {
|
||||
@@ -376,8 +377,8 @@ model TypebotSetting {
|
||||
debounceTime Int? @db.Integer
|
||||
typebotIdFallback String? @db.VarChar(100)
|
||||
ignoreJids Json?
|
||||
splitMessages Boolean? @default(false) @db.Boolean
|
||||
timePerChar Int? @default(50) @db.Integer
|
||||
splitMessages Boolean? @default(false) @db.Boolean
|
||||
timePerChar Int? @default(50) @db.Integer
|
||||
createdAt DateTime? @default(now()) @db.Timestamp
|
||||
updatedAt DateTime @updatedAt @db.Timestamp
|
||||
Fallback Typebot? @relation(fields: [typebotIdFallback], references: [id])
|
||||
@@ -748,4 +749,4 @@ model EvoaiSetting {
|
||||
evoaiIdFallback String? @db.VarChar(100)
|
||||
Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)
|
||||
instanceId String @unique
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user