From b5072486b432d35b2123aedc4479178e23085a75 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Tue, 20 Apr 2021 19:38:07 +0600 Subject: [PATCH] hotfix for versions repo in android --- .../AndroidSQLStandardVersionsRepoProxy.kt | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/repos/common/src/main/kotlin/dev/inmo/micro_utils/repos/versions/AndroidSQLStandardVersionsRepoProxy.kt b/repos/common/src/main/kotlin/dev/inmo/micro_utils/repos/versions/AndroidSQLStandardVersionsRepoProxy.kt index f565147e09b..7c5937c81f0 100644 --- a/repos/common/src/main/kotlin/dev/inmo/micro_utils/repos/versions/AndroidSQLStandardVersionsRepoProxy.kt +++ b/repos/common/src/main/kotlin/dev/inmo/micro_utils/repos/versions/AndroidSQLStandardVersionsRepoProxy.kt @@ -21,14 +21,12 @@ class AndroidSQLStandardVersionsRepoProxy( private val tableVersionColumnName = "version" init { - runBlocking(DatabaseCoroutineContext) { - database.writableTransaction { - createTable( - tableName, - tableNameColumnName to ColumnType.Text.NOT_NULLABLE, - tableVersionColumnName to ColumnType.Numeric.INTEGER() - ) - } + database.blockingWritableTransaction { + createTable( + tableName, + tableNameColumnName to ColumnType.Text.NOT_NULLABLE, + tableVersionColumnName to ColumnType.Numeric.INTEGER() + ) } }