Migration Improvements
This commit is contained in:
parent
d6fa1fc97a
commit
6caf1c1828
1 changed files with 6 additions and 3 deletions
|
@ -60,14 +60,17 @@ func Start(_conf config.Config, tmplFS embed.FS, staticFS embed.FS, migrationsFS
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//err = m.Down()
|
||||||
err = m.Up()
|
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)
|
slog.Error("Unable to Migrate", "err", err)
|
||||||
return
|
return
|
||||||
|
} else {
|
||||||
|
slog.Info("Migration Done")
|
||||||
}
|
}
|
||||||
|
|
||||||
slog.Info("Migration Done")
|
|
||||||
|
|
||||||
mux := http.NewServeMux()
|
mux := http.NewServeMux()
|
||||||
mux.HandleFunc("/worker", handleWorkerWebsocket)
|
mux.HandleFunc("/worker", handleWorkerWebsocket)
|
||||||
mux.Handle("/static/", fs)
|
mux.Handle("/static/", fs)
|
||||||
|
|
Loading…
Add table
Reference in a new issue