From 69c4026f4d15a4e8e6938ef9d91951d0294d9cf9 Mon Sep 17 00:00:00 2001 From: Greyson Parrelli Date: Fri, 17 Jan 2025 11:18:35 -0500 Subject: [PATCH] Add potential fix for some users in the v191 database migration. Relates to #13034 --- .../helpers/migration/V191_UniqueMessageMigrationV2.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/helpers/migration/V191_UniqueMessageMigrationV2.kt b/app/src/main/java/org/thoughtcrime/securesms/database/helpers/migration/V191_UniqueMessageMigrationV2.kt index e1f107ca1b..d40c4f8407 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/helpers/migration/V191_UniqueMessageMigrationV2.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/database/helpers/migration/V191_UniqueMessageMigrationV2.kt @@ -30,6 +30,9 @@ object V191_UniqueMessageMigrationV2 : SignalDatabaseMigration { // We're dropping it to put everyone back on the same playing field. db.execSQL("DROP INDEX IF EXISTS message_unique_sent_from_thread") + // To aid people who may have bad old migration state + db.execSQL("INSERT INTO message_fts(message_fts) VALUES ('rebuild')") + val stopwatch = Stopwatch("migration") // Back in the day, we used to insert expiration updates with the same timestamp as the message that triggered them. To resolve the conflict, we can just