This commit is contained in:
Tomas Dvorak
2026-03-13 14:34:19 +01:00
parent 84a8acf944
commit 30d70a6aeb
126 changed files with 27297 additions and 29069 deletions
+3 -1
View File
@@ -51,7 +51,9 @@ func main() {
// Optional migrations for eshop-specific tables only (will be added later)
runMigrations, _ := strconv.ParseBool(os.Getenv("RUN_MIGRATIONS"))
if runMigrations {
log.Println("[eshop] RUN_MIGRATIONS is true, but no eshop-specific migrations are defined yet")
if err := database.MigrateDB(dbInstance); err != nil {
log.Fatalf("[eshop] Failed to run database migrations: %v", err)
}
}
// Initialize Gin router with a similar hardened stack as the main backend