models migrated and data insert success with dbeaver

This commit is contained in:
Ravi Prasad
2025-07-04 03:12:59 -05:00
parent cbbb1aef44
commit a16af088af
4 changed files with 17 additions and 6 deletions
+12 -1
View File
@@ -40,8 +40,19 @@ func InitDB(shouldMigrate bool) *gorm.DB {
if err := db.AutoMigrate(&models.APIKey{}); err != nil {
log.Fatalf("migrate APIKey: %v", err)
}
// Game Models
if err := db.AutoMigrate(
&models.Game{},
&models.LineScore{},
&models.PlayerGameBasicStat{},
&models.PlayerGameAdvStat{},
&models.TeamGameBasicStat{},
&models.TeamGameAdvStat{},
); err != nil {
log.Fatalf("migrate game models: %v", err)
}
metrics.DBOperationsTotal.WithLabelValues("migrate", "database").Inc()
}
return db
}
}