Allow duplicate message IDs

Some providers, in any case Gmail, allow duplicate message IDs as well
This commit is contained in:
M66B
2019-03-31 16:36:41 +02:00
parent f9737d68e2
commit d612ec55d3
4 changed files with 1668 additions and 11 deletions

View File

@@ -50,7 +50,7 @@ import io.requery.android.database.sqlite.RequerySQLiteOpenHelperFactory;
// https://developer.android.com/topic/libraries/architecture/room.html
@Database(
version = 62,
version = 63,
entities = {
EntityIdentity.class,
EntityAccount.class,
@@ -676,6 +676,14 @@ public abstract class DB extends RoomDatabase {
db.execSQL("ALTER TABLE `account` ADD COLUMN `warning` TEXT");
}
})
.addMigrations(new Migration(62, 63) {
@Override
public void migrate(SupportSQLiteDatabase db) {
Log.i("DB migration from version " + startVersion + " to " + endVersion);
db.execSQL("DROP INDEX index_message_msgid_folder");
db.execSQL("CREATE INDEX `index_message_msgid` ON `message` (`msgid`)");
}
})
.build();
}