aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2016-04-23 22:45:22 +0200
committersteckbrief <steckbrief@chefmail.de>2016-04-23 22:45:22 +0200
commitab82801448ed2e89e1387235f74ff37818767e2b (patch)
tree4660778c4f2b80f20bdf1c36649c59aa028799a6 /src/main/java/de
parent16e8de10855aef0750977a084c4ccb09762b3dfc (diff)
Related to FS#134: check if oldversion is smaller then new version on upgrading c+ db
Diffstat (limited to 'src/main/java/de')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/persistance/DatabaseBackend.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/persistance/DatabaseBackend.java b/src/main/java/de/thedevstack/conversationsplus/persistance/DatabaseBackend.java
index 738b78ad..5a5746d5 100644
--- a/src/main/java/de/thedevstack/conversationsplus/persistance/DatabaseBackend.java
+++ b/src/main/java/de/thedevstack/conversationsplus/persistance/DatabaseBackend.java
@@ -34,7 +34,6 @@ import java.util.concurrent.CopyOnWriteArrayList;
import org.json.JSONException;
import de.thedevstack.android.logcat.Logging;
-import de.thedevstack.conversationsplus.BuildConfig;
import de.thedevstack.conversationsplus.Config;
import de.thedevstack.conversationsplus.crypto.axolotl.AxolotlServiceImpl;
import de.thedevstack.conversationsplus.crypto.axolotl.SQLiteAxolotlStore;
@@ -197,7 +196,7 @@ public class DatabaseBackend extends SQLiteOpenHelper {
protected void onUpgradeCPlusDatabase(SQLiteDatabase db, int oldVersion, int newVersion) {
Logging.d("db.upgrade.cplus", "Updating Conversations+ database from version '" + oldVersion + "' to '" + newVersion + "'");
- if (oldVersion != newVersion) {
+ if (oldVersion < newVersion) {
if (oldVersion == 0 && newVersion == 1) {
Logging.d("db.upgrade.cplus", "Creating additional parameters table for messages.");
db.execSQL(MessageDatabaseAccess.TABLE_ADDITIONAL_PARAMETERS_CREATE_V0);