internal/migrate: remove duplicate logging (#3000)
This commit is contained in:
parent
289cfe8ff2
commit
b9e5331193
@ -117,12 +117,6 @@ func (migration *Migration) Run(log *zap.Logger) error {
|
||||
return Error.Wrap(err)
|
||||
}
|
||||
|
||||
if version >= 0 {
|
||||
log.Info("Latest Version", zap.Int("version", version))
|
||||
} else {
|
||||
log.Info("No Version")
|
||||
}
|
||||
|
||||
if step.Version <= version {
|
||||
continue
|
||||
}
|
||||
@ -150,6 +144,13 @@ func (migration *Migration) Run(log *zap.Logger) error {
|
||||
}
|
||||
}
|
||||
|
||||
if len(migration.Steps) > 0 {
|
||||
last := migration.Steps[len(migration.Steps)-1]
|
||||
log.Info("Database Version", zap.Int("version", last.Version))
|
||||
} else {
|
||||
log.Info("No Versions")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user