Skip to content

Commit

Permalink
Storage: SQL migrator too chatty (#3092)
Browse files Browse the repository at this point in the history
  • Loading branch information
reinkrul authored May 7, 2024
1 parent 734f544 commit 476cb42
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions storage/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,17 +252,14 @@ func (e *engine) initSQLDatabase() error {
}

log.Logger().Debug("Running database migrations...")
result, err := gooseProvider.Up(context.Background())
results, err := gooseProvider.Up(context.Background())
for _, result := range results {
log.Logger().Debug(result.String())
}
if err != nil {
for _, r := range result {
log.Logger().Info(r.String())
}
return fmt.Errorf("failed to migrate database: %w", err)
}
log.Logger().Infof("Completed %d migrations", len(result))
for _, r := range result {
log.Logger().Info(r.String())
}
log.Logger().Infof("Completed %d migrations", len(results))

return nil
}
Expand Down

0 comments on commit 476cb42

Please sign in to comment.