Skip to content

Commit 9fecafd

Browse files
committed
bug fixes
1 parent bbde9be commit 9fecafd

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

app/src/main/java/co/tinode/tindroid/db/BaseDb.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
8888
db.execSQL(MessageDb.DROP_INDEX);
8989
db.execSQL(MessageDb.DROP_INDEX_2);
9090
db.execSQL(MessageDb.DROP_TABLE);
91+
// Remove this on the next release.
92+
db.execSQL("DROP TABLE IF EXISTS edit_history");
9193
db.execSQL(SubscriberDb.DROP_INDEX);
9294
db.execSQL(SubscriberDb.DROP_TABLE);
9395
db.execSQL(UserDb.DROP_INDEX);

app/src/main/java/co/tinode/tindroid/db/MessageDb.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ public class MessageDb implements BaseColumns {
153153
"CREATE UNIQUE INDEX " + INDEX_NAME_2 +
154154
" ON " + TABLE_NAME + " (" +
155155
COLUMN_NAME_TOPIC_ID + "," +
156-
COLUMN_NAME_EFFECTIVE_SEQ + " DESC WHERE " + COLUMN_NAME_EFFECTIVE_SEQ + " IS NOT NULL)";
156+
COLUMN_NAME_EFFECTIVE_SEQ + " DESC) WHERE " + COLUMN_NAME_EFFECTIVE_SEQ + " IS NOT NULL";
157157
/**
158158
* Save message to DB
159159
*

0 commit comments

Comments
 (0)