feat: Add rider substitution system

This commit is contained in:
2026-06-22 17:38:05 +05:30
parent 6ab508560f
commit 588f27b917
6 changed files with 334 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ import (
"context"
"database/sql"
"fmt"
"nearle/models"
"nearle/utils"
"os"
@@ -88,6 +89,9 @@ func setupDB(database *gorm.DB) {
return
}
// Auto-migrate the rider_substitutions table
database.AutoMigrate(&models.RiderSubstitution{})
// 🔥 K8s SAFE CONFIG
sqlDB.SetMaxOpenConns(30) // total open connections
sqlDB.SetMaxIdleConns(5) // idle connections