Rebuild search index

This commit is contained in:
M66B 2022-10-14 11:05:06 +02:00
parent 1e437dc8a7
commit 22761c31bb
2 changed files with 2809 additions and 1 deletions

File diff suppressed because it is too large Load Diff

View File

@ -68,7 +68,7 @@ import javax.mail.internet.InternetAddress;
// https://developer.android.com/topic/libraries/architecture/room.html // https://developer.android.com/topic/libraries/architecture/room.html
@Database( @Database(
version = 248, version = 249,
entities = { entities = {
EntityIdentity.class, EntityIdentity.class,
EntityAccount.class, EntityAccount.class,
@ -2493,6 +2493,13 @@ public abstract class DB extends RoomDatabase {
logMigration(startVersion, endVersion); logMigration(startVersion, endVersion);
EntityMessage.convert(context); EntityMessage.convert(context);
} }
}).addMigrations(new Migration(248, 249) {
@Override
public void migrate(@NonNull SupportSQLiteDatabase db) {
Fts4DbHelper.delete(context);
Fts5DbHelper.delete(context);
db.execSQL("UPDATE `message` SET fts = 0");
}
}).addMigrations(new Migration(998, 999) { }).addMigrations(new Migration(998, 999) {
@Override @Override
public void migrate(@NonNull SupportSQLiteDatabase db) { public void migrate(@NonNull SupportSQLiteDatabase db) {