From dcc533ef4946a4c2fcfb1c34029840d925b31fe8 Mon Sep 17 00:00:00 2001 From: Alex Hart Date: Fri, 17 Oct 2025 16:03:19 -0300 Subject: [PATCH] Remove body of migration 293. --- .../helpers/SignalDatabaseMigrations.kt | 3 +- .../V293_LastResortKeyTupleTableMigration.kt | 29 ------------------- ...ResortKeyTupleColumnConstraintMigration.kt | 2 +- 3 files changed, 2 insertions(+), 32 deletions(-) delete mode 100644 app/src/main/java/org/thoughtcrime/securesms/database/helpers/migration/V293_LastResortKeyTupleTableMigration.kt diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/helpers/SignalDatabaseMigrations.kt b/app/src/main/java/org/thoughtcrime/securesms/database/helpers/SignalDatabaseMigrations.kt index 5b4ce4333a..e70e6d751e 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/helpers/SignalDatabaseMigrations.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/database/helpers/SignalDatabaseMigrations.kt @@ -147,7 +147,6 @@ import org.thoughtcrime.securesms.database.helpers.migration.V289_AddQuoteTarget import org.thoughtcrime.securesms.database.helpers.migration.V290_AddArchiveThumbnailTransferStateColumn import org.thoughtcrime.securesms.database.helpers.migration.V291_NullOutRemoteKeyIfEmpty import org.thoughtcrime.securesms.database.helpers.migration.V292_AddPollTables -import org.thoughtcrime.securesms.database.helpers.migration.V293_LastResortKeyTupleTableMigration import org.thoughtcrime.securesms.database.helpers.migration.V294_RemoveLastResortKeyTupleColumnConstraintMigration import org.thoughtcrime.securesms.database.helpers.migration.V295_AddLastRestoreKeyTypeTableIfMissingMigration import org.thoughtcrime.securesms.database.SQLiteDatabase as SignalSqliteDatabase @@ -303,7 +302,7 @@ object SignalDatabaseMigrations { 290 to V290_AddArchiveThumbnailTransferStateColumn, 291 to V291_NullOutRemoteKeyIfEmpty, 292 to V292_AddPollTables, - 293 to V293_LastResortKeyTupleTableMigration, + // 293 to V293_LastResortKeyTupleTableMigration, - removed due to crashing on some devices. 294 to V294_RemoveLastResortKeyTupleColumnConstraintMigration, 295 to V295_AddLastRestoreKeyTypeTableIfMissingMigration ) diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/helpers/migration/V293_LastResortKeyTupleTableMigration.kt b/app/src/main/java/org/thoughtcrime/securesms/database/helpers/migration/V293_LastResortKeyTupleTableMigration.kt deleted file mode 100644 index 84867bf1e8..0000000000 --- a/app/src/main/java/org/thoughtcrime/securesms/database/helpers/migration/V293_LastResortKeyTupleTableMigration.kt +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2025 Signal Messenger, LLC - * SPDX-License-Identifier: AGPL-3.0-only - */ - -package org.thoughtcrime.securesms.database.helpers.migration - -import android.app.Application -import org.thoughtcrime.securesms.database.SQLiteDatabase - -/** - * Creates the LastResortKeyTuple table. - */ -@Suppress("ClassName") -object V293_LastResortKeyTupleTableMigration : SignalDatabaseMigration { - override fun migrate(context: Application, db: SQLiteDatabase, oldVersion: Int, newVersion: Int) { - db.execSQL( - """ - CREATE TABLE last_resort_key_tuple ( - _id INTEGER PRIMARY KEY, - kyber_prekey_id INTEGER NOT NULL UNIQUE REFERENCES kyber_prekey (_id) ON DELETE CASCADE, - signed_key_id INTEGER NOT NULL, - public_key BLOB NOT NULL, - UNIQUE(kyber_prekey_id, signed_key_id, public_key) - ) - """ - ) - } -} diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/helpers/migration/V294_RemoveLastResortKeyTupleColumnConstraintMigration.kt b/app/src/main/java/org/thoughtcrime/securesms/database/helpers/migration/V294_RemoveLastResortKeyTupleColumnConstraintMigration.kt index 1792db9fb4..c55502d0ed 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/helpers/migration/V294_RemoveLastResortKeyTupleColumnConstraintMigration.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/database/helpers/migration/V294_RemoveLastResortKeyTupleColumnConstraintMigration.kt @@ -14,7 +14,7 @@ import org.thoughtcrime.securesms.database.SQLiteDatabase @Suppress("ClassName") object V294_RemoveLastResortKeyTupleColumnConstraintMigration : SignalDatabaseMigration { override fun migrate(context: Application, db: SQLiteDatabase, oldVersion: Int, newVersion: Int) { - db.execSQL("DROP TABLE last_resort_key_tuple") + db.execSQL("DROP TABLE IF EXISTS last_resort_key_tuple") db.execSQL( """