aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/persistance
diff options
context:
space:
mode:
authorDaniel Gultsch <inputmice@siacs.eu>2015-01-02 01:21:14 +0100
committerDaniel Gultsch <inputmice@siacs.eu>2015-01-02 01:21:14 +0100
commit3833e6dfef8c7a06982ad7783f89c28d27d83bfe (patch)
treef8cbad96e63401728a2a760435ce90db99481abb /src/main/java/eu/siacs/conversations/persistance
parentb71740f0d40ed3fb3e5b790d80ed6cb235f97d04 (diff)
improved OTR verification part one
Diffstat (limited to 'src/main/java/eu/siacs/conversations/persistance')
-rw-r--r--src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java b/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java
index 7d29314b..5fa61491 100644
--- a/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java
+++ b/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java
@@ -22,7 +22,7 @@ public class DatabaseBackend extends SQLiteOpenHelper {
private static DatabaseBackend instance = null;
private static final String DATABASE_NAME = "history";
- private static final int DATABASE_VERSION = 12;
+ private static final int DATABASE_VERSION = 13;
private static String CREATE_CONTATCS_STATEMENT = "create table "
+ Contact.TABLENAME + "(" + Contact.ACCOUNT + " TEXT, "
@@ -126,6 +126,10 @@ public class DatabaseBackend extends SQLiteOpenHelper {
db.execSQL("ALTER TABLE " + Message.TABLENAME + " ADD COLUMN "
+ Message.SERVER_MSG_ID + " TEXT");
}
+ if (oldVersion < 13 && newVersion >= 13) {
+ db.execSQL("delete from "+Contact.TABLENAME);
+ db.execSQL("update "+Account.TABLENAME+" set "+Account.ROSTERVERSION+" = NULL");
+ }
}
public static synchronized DatabaseBackend getInstance(Context context) {