aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/persistance
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2019-03-14 20:39:24 +0100
committerChristian Schneppe <christian@pix-art.de>2019-03-14 20:39:24 +0100
commitab0d3c397493377eb98f9713fc669fb5ec72a45b (patch)
treecd7486e1fc92e021f5bc03b797e13127282950e4 /src/main/java/de/pixart/messenger/persistance
parentc529b0139dd8a5a3f48f4c974daa8d69a1275ed3 (diff)
fix backup creation for older installations
If you had problems importing the backup you need to create a new backup after this patch
Diffstat (limited to 'src/main/java/de/pixart/messenger/persistance')
-rw-r--r--src/main/java/de/pixart/messenger/persistance/DatabaseBackend.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/persistance/DatabaseBackend.java b/src/main/java/de/pixart/messenger/persistance/DatabaseBackend.java
index 8336a4ed9..e2c83321d 100644
--- a/src/main/java/de/pixart/messenger/persistance/DatabaseBackend.java
+++ b/src/main/java/de/pixart/messenger/persistance/DatabaseBackend.java
@@ -60,7 +60,7 @@ import rocks.xmpp.addr.Jid;
public class DatabaseBackend extends SQLiteOpenHelper {
public static final String DATABASE_NAME = "history";
- public static final int DATABASE_VERSION = 46; // = Conversations DATABASE_VERSION + 2
+ public static final int DATABASE_VERSION = 47; // = Conversations DATABASE_VERSION + 3
private static DatabaseBackend instance = null;
private static String CREATE_CONTATCS_STATEMENT = "create table "
@@ -136,7 +136,6 @@ public class DatabaseBackend extends SQLiteOpenHelper {
+ SQLiteAxolotlStore.OWN + " INTEGER, "
+ SQLiteAxolotlStore.FINGERPRINT + " TEXT, "
+ SQLiteAxolotlStore.CERTIFICATE + " BLOB, "
- + SQLiteAxolotlStore.TRUSTED + " TEXT, "
+ SQLiteAxolotlStore.TRUST + " TEXT, "
+ SQLiteAxolotlStore.ACTIVE + " NUMBER, "
+ SQLiteAxolotlStore.LAST_ACTIVATION + " NUMBER,"
@@ -554,7 +553,7 @@ public class DatabaseBackend extends SQLiteOpenHelper {
db.execSQL(CREATE_MESSAGE_TYPE_INDEX);
}
- if (oldVersion < 46 && newVersion >= 46) {
+ if (oldVersion < 46 && newVersion == 46) { // only available for old database version 46
if (!isColumnExisting(db, SQLiteAxolotlStore.IDENTITIES_TABLENAME, SQLiteAxolotlStore.TRUSTED)) {
db.execSQL("ALTER TABLE " + SQLiteAxolotlStore.IDENTITIES_TABLENAME + " ADD COLUMN " + SQLiteAxolotlStore.TRUSTED); // TODO - just to make old databases importable, column isn't needed at all
}