aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/persistance
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/eu/siacs/conversations/persistance')
-rw-r--r--src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java11
1 files changed, 10 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 8b74581cc..2347c3188 100644
--- a/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java
+++ b/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java
@@ -43,7 +43,7 @@ public class DatabaseBackend extends SQLiteOpenHelper {
private static DatabaseBackend instance = null;
private static final String DATABASE_NAME = "history";
- private static final int DATABASE_VERSION = 20;
+ private static final int DATABASE_VERSION = 21;
private static String CREATE_CONTATCS_STATEMENT = "create table "
+ Contact.TABLENAME + "(" + Contact.ACCOUNT + " TEXT, "
@@ -335,6 +335,15 @@ public class DatabaseBackend extends SQLiteOpenHelper {
if (oldVersion < 18 && newVersion >= 18) {
db.execSQL("ALTER TABLE " + Message.TABLENAME + " ADD COLUMN " + Message.READ + " NUMBER DEFAULT 1");
}
+
+ if (oldVersion < 21 && newVersion >= 21) {
+ List<Account> accounts = getAccounts(db);
+ for (Account account : accounts) {
+ account.unsetPgpSignature();
+ db.update(Account.TABLENAME, account.getContentValues(), Account.UUID
+ + "=?", new String[]{account.getUuid()});
+ }
+ }
}
public static synchronized DatabaseBackend getInstance(Context context) {