Fix migration logs

This commit is contained in:
Kirill Kamakin
2022-12-11 17:49:52 +01:00
parent e36cb12431
commit 901d37570a

View File

@@ -26,10 +26,10 @@ class MigrationDetectorImpl @Inject constructor(
if (lastVersion != currentVersion) { if (lastVersion != currentVersion) {
migrationExecutors migrationExecutors
.filter { it.migratingFrom <= lastVersion } .filter { it.migratingFrom <= lastVersion }
.forEach { .forEach { executor ->
runCatchingExceptCancel { it.executeMigration() } runCatchingExceptCancel { executor.executeMigration() }
.onFailure { logger.e(it) { "Migration executor failed: $it" } } .onFailure { logger.e(it) { "Migration executor failed: $executor" } }
.onSuccess { logger.i { "Migration executor succeeded: $it" } } .onSuccess { logger.i { "Migration executor succeeded: $executor" } }
} }
} }