refactor: Simplify migration logging by removing redundant config.Debug check

This commit is contained in:
SoXX 2024-08-13 12:54:02 +02:00
parent ad076f585b
commit 1345fa9c9e

View File

@ -110,13 +110,11 @@ func migrateDatabase(ctx context.Context, dbPool *gorm.DB, config models.Databas
return utils.HandleError(ctx, span, localLogger, err) return utils.HandleError(ctx, span, localLogger, err)
} }
if config.Debug {
if n != 0 { if n != 0 {
localLogger.Debugf("applied %d migrations!", n) localLogger.Debugf("applied %d migrations!", n)
} else { } else {
localLogger.Debug("nothing to migrate") localLogger.Debug("nothing to migrate")
} }
}
utils.HandleEvent(span, localLogger, "Database migration completed successfully") utils.HandleEvent(span, localLogger, "Database migration completed successfully")
return nil return nil