mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
fix: Is it migrator all along?
This commit is contained in:
parent
64ee8f9235
commit
9feba40ab7
1 changed files with 2 additions and 1 deletions
|
@ -3,6 +3,7 @@ package dev.yokai.core.migration
|
|||
import co.touchlab.kermit.Logger
|
||||
import kotlinx.coroutines.CompletableDeferred
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.CoroutineStart
|
||||
import kotlinx.coroutines.Deferred
|
||||
import kotlinx.coroutines.async
|
||||
|
||||
|
@ -16,7 +17,7 @@ class MigrationJobFactory(
|
|||
.fold(CompletableDeferred(true)) { acc: Deferred<Boolean>, migration: Migration ->
|
||||
if (!migrationContext.dryRun) {
|
||||
Logger.i { "Running migration: { name = ${migration::class.simpleName}, version = ${migration.version} }" }
|
||||
async {
|
||||
async(start = CoroutineStart.UNDISPATCHED) {
|
||||
val prev = acc.await()
|
||||
migration(migrationContext) || prev
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue