Match attachments by properties

This commit is contained in:
M66B
2019-05-08 10:32:37 +02:00
parent 61f7a2f692
commit 4cf330dfb6
11 changed files with 1807 additions and 57 deletions

View File

@@ -51,7 +51,7 @@ import io.requery.android.database.sqlite.RequerySQLiteOpenHelperFactory;
// https://developer.android.com/topic/libraries/architecture/room.html
@Database(
version = 79,
version = 80,
entities = {
EntityIdentity.class,
EntityAccount.class,
@@ -801,6 +801,14 @@ public abstract class DB extends RoomDatabase {
db.execSQL("ALTER TABLE `message` ADD COLUMN `plain_only` INTEGER");
}
})
.addMigrations(new Migration(79, 80) {
@Override
public void migrate(SupportSQLiteDatabase db) {
Log.i("DB migration from version " + startVersion + " to " + endVersion);
db.execSQL("DROP INDEX index_attachment_message_cid");
db.execSQL("CREATE INDEX `index_attachment_message_cid` ON `attachment` (`message`, `cid`)");
}
})
.build();
}