Cleanup found messages

This commit is contained in:
M66B
2018-09-04 14:07:50 +00:00
parent 13de85a3d3
commit 75697fe57d
5 changed files with 918 additions and 3 deletions

View File

@@ -45,7 +45,7 @@ import androidx.sqlite.db.SupportSQLiteDatabase;
// https://developer.android.com/topic/libraries/architecture/room.html
@Database(
version = 7,
version = 8,
entities = {
EntityIdentity.class,
EntityAccount.class,
@@ -161,6 +161,13 @@ public abstract class DB extends RoomDatabase {
db.execSQL("CREATE INDEX `index_log_time` ON `log` (`time`)");
}
})
.addMigrations(new Migration(7, 8) {
@Override
public void migrate(SupportSQLiteDatabase db) {
Log.i(Helper.TAG, "DB migration from version " + startVersion + " to " + endVersion);
db.execSQL("CREATE INDEX `index_message_ui_found` ON `message` (`ui_found`)");
}
})
.build();
}