diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-09-27 18:16:31 +0200 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-09-27 18:16:31 +0200 |
commit | 1ae9338fc9d5f8e1f6505445f07f4476efd8f139 (patch) | |
tree | ab69023e8b39ece36334072ebc9f82e520fddd67 /src/eu/siacs/conversations/persistance | |
parent | 4a9ed0e208f716d41e5bd4fb525a64661c0de8f8 (diff) |
made muc passwords and prefereced encryption method persistant across restarts
Diffstat (limited to '')
-rw-r--r-- | src/eu/siacs/conversations/persistance/DatabaseBackend.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/eu/siacs/conversations/persistance/DatabaseBackend.java b/src/eu/siacs/conversations/persistance/DatabaseBackend.java index 51fd79e5..7afe387e 100644 --- a/src/eu/siacs/conversations/persistance/DatabaseBackend.java +++ b/src/eu/siacs/conversations/persistance/DatabaseBackend.java @@ -19,7 +19,7 @@ public class DatabaseBackend extends SQLiteOpenHelper { private static DatabaseBackend instance = null; private static final String DATABASE_NAME = "history"; - private static final int DATABASE_VERSION = 7; + private static final int DATABASE_VERSION = 8; private static String CREATE_CONTATCS_STATEMENT = "create table " + Contact.TABLENAME + "(" + Contact.ACCOUNT + " TEXT, " @@ -50,8 +50,8 @@ public class DatabaseBackend extends SQLiteOpenHelper { + " TEXT, " + Conversation.CONTACT + " TEXT, " + Conversation.ACCOUNT + " TEXT, " + Conversation.CONTACTJID + " TEXT, " + Conversation.CREATED + " NUMBER, " - + Conversation.STATUS + " NUMBER," + Conversation.MODE - + " NUMBER," + "FOREIGN KEY(" + Conversation.ACCOUNT + + Conversation.STATUS + " NUMBER, " + Conversation.MODE + + " NUMBER, "+Conversation.ATTRIBUTES + " TEXT, FOREIGN KEY(" + Conversation.ACCOUNT + ") REFERENCES " + Account.TABLENAME + "(" + Account.UUID + ") ON DELETE CASCADE);"); db.execSQL("create table " + Message.TABLENAME + "( " + Message.UUID @@ -96,6 +96,10 @@ public class DatabaseBackend extends SQLiteOpenHelper { db.execSQL("ALTER TABLE " + Account.TABLENAME + " ADD COLUMN " + Account.AVATAR + " TEXT"); } + if (oldVersion < 8 && newVersion >= 8) { + db.execSQL("ALTER TABLE " + Conversation.TABLENAME + " ADD COLUMN " + + Conversation.ATTRIBUTES + " TEXT"); + } } public static synchronized DatabaseBackend getInstance(Context context) { |