aboutsummaryrefslogtreecommitdiffstats
path: root/src/de/gultsch/chat/persistance/DatabaseBackend.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/de/gultsch/chat/persistance/DatabaseBackend.java')
-rw-r--r--src/de/gultsch/chat/persistance/DatabaseBackend.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/de/gultsch/chat/persistance/DatabaseBackend.java b/src/de/gultsch/chat/persistance/DatabaseBackend.java
index 58f052ecc..b3290ee0d 100644
--- a/src/de/gultsch/chat/persistance/DatabaseBackend.java
+++ b/src/de/gultsch/chat/persistance/DatabaseBackend.java
@@ -38,8 +38,8 @@ public class DatabaseBackend extends SQLiteOpenHelper {
+ " NUMBER)");
db.execSQL("create table " + Conversation.TABLENAME + " ("
+ Conversation.UUID + " TEXT PRIMARY KEY, " + Conversation.NAME
- + " TEXT, " + Conversation.PHOTO_URI + " TEXT, "
- + Conversation.ACCOUNT + " TEXT, " + Conversation.CONTACT
+ + " TEXT, " + Conversation.CONTACT + " TEXT, "
+ + Conversation.ACCOUNT + " TEXT, " + Conversation.CONTACTJID
+ " TEXT, " + Conversation.CREATED + " NUMBER, "
+ Conversation.STATUS + " NUMBER," + Conversation.MODE
+ " NUMBER," + "FOREIGN KEY(" + Conversation.ACCOUNT
@@ -139,7 +139,7 @@ public class DatabaseBackend extends SQLiteOpenHelper {
SQLiteDatabase db = this.getReadableDatabase();
String[] selectionArgs = { account.getUuid(), contactJid };
Cursor cursor = db.query(Conversation.TABLENAME, null,
- Conversation.ACCOUNT + "=? AND " + Conversation.CONTACT + "=?",
+ Conversation.ACCOUNT + "=? AND " + Conversation.CONTACTJID + "=?",
selectionArgs, null, null, null);
if (cursor.getCount() == 0)
return null;