From be55e1bb554c5a131e70f2ae1002c25f3ccecb08 Mon Sep 17 00:00:00 2001 From: Mikunj Date: Wed, 2 Oct 2019 16:26:03 +1000 Subject: [PATCH] Fixed multi device database primary key allocation. --- src/org/thoughtcrime/securesms/loki/LokiAPIDatabase.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/loki/LokiAPIDatabase.kt b/src/org/thoughtcrime/securesms/loki/LokiAPIDatabase.kt index 39f45ebbe0..7ec5174289 100644 --- a/src/org/thoughtcrime/securesms/loki/LokiAPIDatabase.kt +++ b/src/org/thoughtcrime/securesms/loki/LokiAPIDatabase.kt @@ -54,7 +54,7 @@ class LokiAPIDatabase(context: Context, helper: SQLCipherOpenHelper) : Database( private val secondaryDevice = "secondary_device" private val requestSignature = "request_signature" private val grantSignature = "grant_signature" - @JvmStatic val createMultiDeviceAuthTableCommand = "CREATE TABLE $multiDeviceAuthTable(_id INTEGER PRIMARY KEY AUTOINCREMENT, $primaryDevice TEXT, $secondaryDevice TEXT, $requestSignature TEXT NULLABLE DEFAULT NULL, $grantSignature TEXT NULLABLE DEFAULT NULL);" + @JvmStatic val createMultiDeviceAuthTableCommand = "CREATE TABLE $multiDeviceAuthTable($primaryDevice TEXT, $secondaryDevice TEXT, $requestSignature TEXT NULLABLE DEFAULT NULL, $grantSignature TEXT NULLABLE DEFAULT NULL, PRIMARY KEY ($primaryDevice, $secondaryDevice));" } override fun getSwarmCache(hexEncodedPublicKey: String): Set? {