Migration Improvements

This commit is contained in:
Samuel Lorch 2024-05-05 01:32:05 +02:00
parent d6fa1fc97a
commit 6caf1c1828

View file

@ -60,13 +60,16 @@ func Start(_conf config.Config, tmplFS embed.FS, staticFS embed.FS, migrationsFS
return
}
//err = m.Down()
err = m.Up()
if err != nil {
if err == migrate.ErrNoChange {
slog.Info("No Migrations Required")
} else if err != nil {
slog.Error("Unable to Migrate", "err", err)
return
}
} else {
slog.Info("Migration Done")
}
mux := http.NewServeMux()
mux.HandleFunc("/worker", handleWorkerWebsocket)