From 696f791dcacfd4ee0bec8d2afb82473a12796945 Mon Sep 17 00:00:00 2001 From: Geno Date: Mon, 1 Feb 2021 09:41:50 +0100 Subject: [PATCH] release 2.9.6.1 : fix crashes with internal database error --- build.gradle | 4 ++-- metadata/en-US/changelogs/408.txt | 1 + .../eu/siacs/conversations/persistance/DatabaseBackend.java | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 metadata/en-US/changelogs/408.txt diff --git a/build.gradle b/build.gradle index fefd66061..4046ff599 100644 --- a/build.gradle +++ b/build.gradle @@ -95,8 +95,8 @@ android { defaultConfig { minSdkVersion 21 targetSdkVersion 29 - versionCode 407 - versionName "2.9.6" + versionCode 408 + versionName "2.9.6.1" archivesBaseName += "-$versionName" applicationId "eu.sum7.conversations" resValue "string", "applicationId", applicationId diff --git a/metadata/en-US/changelogs/408.txt b/metadata/en-US/changelogs/408.txt new file mode 100644 index 000000000..91096a50b --- /dev/null +++ b/metadata/en-US/changelogs/408.txt @@ -0,0 +1 @@ +• fix crashes (error on internal database migration) diff --git a/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java b/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java index f21efa6d5..68592cacb 100644 --- a/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java +++ b/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java @@ -62,7 +62,7 @@ import eu.siacs.conversations.xmpp.mam.MamReference; public class DatabaseBackend extends SQLiteOpenHelper { private static final String DATABASE_NAME = "history"; - private static final int DATABASE_VERSION = 48; + private static final int DATABASE_VERSION = 49; private static DatabaseBackend instance = null; private static final String CREATE_CONTATCS_STATEMENT = "create table " + Contact.TABLENAME + "(" + Contact.ACCOUNT + " TEXT, " @@ -563,7 +563,7 @@ public class DatabaseBackend extends SQLiteOpenHelper { if (oldVersion < 48 && newVersion >= 48) { db.execSQL("ALTER TABLE " + Contact.TABLENAME + " ADD COLUMN " + Contact.PRESENCE_NAME + " TEXT"); } - if (oldVersion < 48 && newVersion >= 48) { + if (oldVersion < 49 && newVersion >= 49) { db.execSQL("ALTER TABLE " + Contact.TABLENAME + " ADD COLUMN " + Contact.RTP_CAPABILITY + " TEXT"); } }