aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/persistance/DatabaseBackend.java
diff options
context:
space:
mode:
authorlookshe <github@lookshe.org>2016-03-08 21:13:24 +0100
committerlookshe <github@lookshe.org>2016-03-08 21:13:24 +0100
commit74d6d10cb76b7440f57db193a3c38e476206969c (patch)
tree665b7787c0f7bcb6d759e849972fa9658e84423f /src/main/java/de/thedevstack/conversationsplus/persistance/DatabaseBackend.java
parent7be757de90fb71042b79b88a76cd36fc07b2ee87 (diff)
parentf051dd0bcdbd35d101420fb1f75f33a565a1e0f8 (diff)
Merge branch 'trz/rebase' into trz/rename
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/persistance/DatabaseBackend.java')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/persistance/DatabaseBackend.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/persistance/DatabaseBackend.java b/src/main/java/de/thedevstack/conversationsplus/persistance/DatabaseBackend.java
index 52f60e88..b6accd1e 100644
--- a/src/main/java/de/thedevstack/conversationsplus/persistance/DatabaseBackend.java
+++ b/src/main/java/de/thedevstack/conversationsplus/persistance/DatabaseBackend.java
@@ -52,7 +52,7 @@ public class DatabaseBackend extends SQLiteOpenHelper {
private static DatabaseBackend instance = null;
private static final String DATABASE_NAME = "history";
- private static final int DATABASE_VERSION = 24;
+ private static final int DATABASE_VERSION = 25;
private static String CREATE_CONTATCS_STATEMENT = "create table "
+ Contact.TABLENAME + "(" + Contact.ACCOUNT + " TEXT, "
@@ -164,6 +164,7 @@ public class DatabaseBackend extends SQLiteOpenHelper {
+ Message.CARBON + " INTEGER, "
+ Message.EDITED + " TEXT, "
+ Message.READ + " NUMBER DEFAULT 1, "
+ + Message.OOB + " INTEGER, "
+ Message.REMOTE_MSG_ID + " TEXT, FOREIGN KEY("
+ Message.CONVERSATION + ") REFERENCES "
+ Conversation.TABLENAME + "(" + Conversation.UUID
@@ -376,6 +377,10 @@ public class DatabaseBackend extends SQLiteOpenHelper {
if (oldVersion < 24 && newVersion >= 24) {
db.execSQL("ALTER TABLE " + Message.TABLENAME + " ADD COLUMN " + Message.EDITED + " TEXT");
}
+
+ if (oldVersion < 25 && newVersion >= 25) {
+ db.execSQL("ALTER TABLE " + Message.TABLENAME + " ADD COLUMN " + Message.OOB + " INTEGER");
+ }
}
public static synchronized DatabaseBackend getInstance(Context context) {