Always keep and synchronize flagged messages

This commit is contained in:
M66B
2018-12-03 09:33:43 +01:00
parent 36e6d34b54
commit b5c7cea122
5 changed files with 1190 additions and 6 deletions

View File

@@ -46,7 +46,7 @@ import io.requery.android.database.sqlite.RequerySQLiteOpenHelperFactory;
// https://developer.android.com/topic/libraries/architecture/room.html
@Database(
version = 12,
version = 13,
entities = {
EntityIdentity.class,
EntityAccount.class,
@@ -220,6 +220,13 @@ public abstract class DB extends RoomDatabase {
db.execSQL("CREATE INDEX `index_operation_message` ON `operation` (`message`)");
}
})
.addMigrations(new Migration(12, 13) {
@Override
public void migrate(SupportSQLiteDatabase db) {
Log.i(Helper.TAG, "DB migration from version " + startVersion + " to " + endVersion);
db.execSQL("CREATE INDEX `index_message_ui_flagged` ON `message` (`ui_flagged`)");
}
})
.build();
}