mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-20 21:27:07 +00:00
Prevent table scan
This commit is contained in:
parent
ee4eb0c009
commit
30e4f994e6
3 changed files with 2902 additions and 1 deletions
2891
app/schemas/eu.faircode.email.DB/266.json
Normal file
2891
app/schemas/eu.faircode.email.DB/266.json
Normal file
File diff suppressed because it is too large
Load diff
|
@ -68,7 +68,7 @@ import javax.mail.internet.InternetAddress;
|
|||
// https://developer.android.com/topic/libraries/architecture/room.html
|
||||
|
||||
@Database(
|
||||
version = 265,
|
||||
version = 266,
|
||||
entities = {
|
||||
EntityIdentity.class,
|
||||
EntityAccount.class,
|
||||
|
@ -2717,6 +2717,14 @@ public abstract class DB extends RoomDatabase {
|
|||
db.execSQL("ALTER TABLE `identity` ADD COLUMN `reply_extra_name` INTEGER NOT NULL DEFAULT 0");
|
||||
createTriggers(db);
|
||||
}
|
||||
}).addMigrations(new Migration(265, 266) {
|
||||
@Override
|
||||
public void migrate(@NonNull SupportSQLiteDatabase db) {
|
||||
logMigration(startVersion, endVersion);
|
||||
db.execSQL("CREATE INDEX `index_message_replying` ON `message` (`replying`)");
|
||||
db.execSQL("CREATE INDEX `index_message_forwarding` ON `message` (`forwarding`)");
|
||||
createTriggers(db);
|
||||
}
|
||||
}).addMigrations(new Migration(998, 999) {
|
||||
@Override
|
||||
public void migrate(@NonNull SupportSQLiteDatabase db) {
|
||||
|
|
|
@ -74,6 +74,8 @@ import javax.mail.internet.InternetAddress;
|
|||
@Index(value = {"account"}),
|
||||
@Index(value = {"folder"}),
|
||||
@Index(value = {"identity"}),
|
||||
@Index(value = {"replying"}),
|
||||
@Index(value = {"forwarding"}),
|
||||
@Index(value = {"folder", "uid"}, unique = true),
|
||||
@Index(value = {"inreplyto"}),
|
||||
@Index(value = {"msgid"}),
|
||||
|
|
Loading…
Reference in a new issue