mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-24 16:53:37 +00:00
Added index on subject, cleanup
This commit is contained in:
parent
f9a41cfce5
commit
83f6150d24
3 changed files with 1552 additions and 10 deletions
1534
app/schemas/eu.faircode.email.DB/50.json
Normal file
1534
app/schemas/eu.faircode.email.DB/50.json
Normal file
File diff suppressed because it is too large
Load diff
|
@ -49,7 +49,7 @@ import io.requery.android.database.sqlite.RequerySQLiteOpenHelperFactory;
|
|||
// https://developer.android.com/topic/libraries/architecture/room.html
|
||||
|
||||
@Database(
|
||||
version = 49,
|
||||
version = 50,
|
||||
entities = {
|
||||
EntityIdentity.class,
|
||||
EntityAccount.class,
|
||||
|
@ -537,6 +537,15 @@ public abstract class DB extends RoomDatabase {
|
|||
db.execSQL("CREATE INDEX `index_operation_name` ON `operation` (`name`)");
|
||||
}
|
||||
})
|
||||
.addMigrations(new Migration(49, 50) {
|
||||
@Override
|
||||
public void migrate(SupportSQLiteDatabase db) {
|
||||
Log.i("DB migration from version " + startVersion + " to " + endVersion);
|
||||
db.execSQL("DROP INDEX `index_message_replying`");
|
||||
db.execSQL("DROP INDEX `index_message_forwarding`");
|
||||
db.execSQL("CREATE INDEX `index_message_subject` ON `message` (`subject`)");
|
||||
}
|
||||
})
|
||||
.build();
|
||||
}
|
||||
|
||||
|
|
|
@ -57,13 +57,12 @@ import static androidx.room.ForeignKey.SET_NULL;
|
|||
@Index(value = {"account"}),
|
||||
@Index(value = {"folder"}),
|
||||
@Index(value = {"identity"}),
|
||||
@Index(value = {"replying"}),
|
||||
@Index(value = {"forwarding"}),
|
||||
@Index(value = {"folder", "uid"}, unique = true),
|
||||
@Index(value = {"msgid", "folder"}, unique = true),
|
||||
@Index(value = {"thread"}),
|
||||
@Index(value = {"sender"}),
|
||||
@Index(value = {"received"}),
|
||||
@Index(value = {"subject"}),
|
||||
@Index(value = {"ui_seen"}),
|
||||
@Index(value = {"ui_flagged"}),
|
||||
@Index(value = {"ui_hide"}),
|
||||
|
|
Loading…
Reference in a new issue