From 3824bb8b8e8cf7ac220d88d850f66b8d16ded26c Mon Sep 17 00:00:00 2001 From: Jonni Liljamo Date: Mon, 30 Sep 2024 13:01:52 +0300 Subject: [PATCH] fix: log error on migration fail --- internal/db/migrations.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/db/migrations.go b/internal/db/migrations.go index b3aaf5a..b35ee6b 100644 --- a/internal/db/migrations.go +++ b/internal/db/migrations.go @@ -40,7 +40,7 @@ func runMigrations() { slog.Info("Running migration", slog.Int("version", i+1)) // + 1 is just a visual thing _, err := DBConn.Exec(migrations[i]) if err != nil { - slog.Error("Migration failed to run!", slog.Int("version", i)) + slog.Error("Migration failed to run!", slog.Int("version", i), slog.String("error", err.Error())) os.Exit(1) } } -- 2.44.1