internal/migrate: remove duplicate logging (#3000)

This commit is contained in:
Egon Elbre 2019-09-11 16:34:48 +03:00 committed by GitHub
parent 289cfe8ff2
commit b9e5331193
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
}