mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-10-05 23:33:34 +01:00
Fix PNI collision crash.
This commit is contained in:
1 parent
e96ff92029
commit
ee831b0221
1 file changed
+6
-1
+6
-1
@@ -182,8 +182,9 @@ object SignalDatabaseMigrations {
|
||||
private const val NOTIFICATION_PROFILES_END_FIX = 124
|
||||
private const val REACTION_BACKUP_CLEANUP = 125
|
||||
private const val REACTION_REMOTE_DELETE_CLEANUP = 126
|
||||
private const val PNI_CLEANUP = 127
|
||||
|
||||
const val DATABASE_VERSION = 126
|
||||
const val DATABASE_VERSION = 127
|
||||
|
||||
@JvmStatic
|
||||
fun migrate(context: Context, db: SQLiteDatabase, oldVersion: Int, newVersion: Int) {
|
||||
@@ -2258,6 +2259,10 @@ object SignalDatabaseMigrations {
|
||||
""".trimIndent()
|
||||
)
|
||||
}
|
||||
|
||||
if (oldVersion < PNI_CLEANUP) {
|
||||
db.execSQL("UPDATE recipient SET pni = NULL WHERE phone IS NULL")
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
|
||||
Reference in new issue
Block a user