diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-08-21 12:32:50 +0200 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-08-21 12:32:50 +0200 |
commit | 4875b52f09eba8e32285e92372f076413d4f649f (patch) | |
tree | 8cb208ddc2c85998ca86baf214029dce13d2853b /src/eu/siacs/conversations/persistance | |
parent | 301477c764f4f23ff223f931b44179b5e09b5d0d (diff) |
make avatars persisent / available even without internet
Diffstat (limited to 'src/eu/siacs/conversations/persistance')
-rw-r--r-- | src/eu/siacs/conversations/persistance/DatabaseBackend.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/persistance/DatabaseBackend.java b/src/eu/siacs/conversations/persistance/DatabaseBackend.java index c3f0d9ee..20cc6fb7 100644 --- a/src/eu/siacs/conversations/persistance/DatabaseBackend.java +++ b/src/eu/siacs/conversations/persistance/DatabaseBackend.java @@ -20,7 +20,7 @@ public class DatabaseBackend extends SQLiteOpenHelper { private static DatabaseBackend instance = null; private static final String DATABASE_NAME = "history"; - private static final int DATABASE_VERSION = 6; + private static final int DATABASE_VERSION = 7; private static String CREATE_CONTATCS_STATEMENT = "create table " + Contact.TABLENAME + "(" + Contact.ACCOUNT + " TEXT, " @@ -86,6 +86,14 @@ public class DatabaseBackend extends SQLiteOpenHelper { db.execSQL("ALTER TABLE " + Message.TABLENAME + " ADD COLUMN " + Message.TRUE_COUNTERPART + " TEXT"); } + if (oldVersion < 7 && newVersion >= 7) { + db.execSQL("ALTER TABLE " + Message.TABLENAME + " ADD COLUMN " + + Message.REMOTE_MSG_ID + " TEXT"); + db.execSQL("ALTER TABLE " + Contact.TABLENAME + " ADD COLUMN " + + Contact.AVATAR + " TEXT"); + db.execSQL("ALTER TABLE " + Account.TABLENAME + " ADD COLUMN " + + Account.AVATAR + " TEXT"); + } } public static synchronized DatabaseBackend getInstance(Context context) { |