From 875d71e9be7aa1fbe02f31c3566abb3501740477 Mon Sep 17 00:00:00 2001 From: Martin/Geno Date: Thu, 3 Oct 2019 16:29:30 +0200 Subject: [PATCH] fix - database update --- build.gradle | 4 ++-- metadata/en-US/changelogs/342.txt | 1 + .../eu/siacs/conversations/persistance/DatabaseBackend.java | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 metadata/en-US/changelogs/342.txt diff --git a/build.gradle b/build.gradle index 30a942a59..d2c20c225 100644 --- a/build.gradle +++ b/build.gradle @@ -84,8 +84,8 @@ android { defaultConfig { minSdkVersion 16 targetSdkVersion 25 - versionCode 341 - versionName "2.5.11" + versionCode 342 + versionName "2.5.11.1" archivesBaseName += "-$versionName" applicationId "eu.sum7.conversations" resValue "string", "applicationId", applicationId diff --git a/metadata/en-US/changelogs/342.txt b/metadata/en-US/changelogs/342.txt new file mode 100644 index 000000000..e8bb4fbba --- /dev/null +++ b/metadata/en-US/changelogs/342.txt @@ -0,0 +1 @@ +• Fixed crash on internal database update diff --git a/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java b/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java index e847426ea..14b1608c2 100644 --- a/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java +++ b/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java @@ -527,7 +527,7 @@ public class DatabaseBackend extends SQLiteOpenHelper { db.execSQL("ALTER TABLE " + Message.TABLENAME + " ADD COLUMN " + Message.BODY_LANGUAGE); } - db.execSQL("DROP TABLE resolver_results"); + db.execSQL("DROP TABLE IF EXISTS resolver_results"); } private void canonicalizeJids(SQLiteDatabase db) {