mirror of https://github.com/M66B/FairEmail.git
Prevent table scan
This commit is contained in:
parent
ee4eb0c009
commit
30e4f994e6
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
|
// https://developer.android.com/topic/libraries/architecture/room.html
|
||||||
|
|
||||||
@Database(
|
@Database(
|
||||||
version = 265,
|
version = 266,
|
||||||
entities = {
|
entities = {
|
||||||
EntityIdentity.class,
|
EntityIdentity.class,
|
||||||
EntityAccount.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");
|
db.execSQL("ALTER TABLE `identity` ADD COLUMN `reply_extra_name` INTEGER NOT NULL DEFAULT 0");
|
||||||
createTriggers(db);
|
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) {
|
}).addMigrations(new Migration(998, 999) {
|
||||||
@Override
|
@Override
|
||||||
public void migrate(@NonNull SupportSQLiteDatabase db) {
|
public void migrate(@NonNull SupportSQLiteDatabase db) {
|
||||||
|
|
|
@ -74,6 +74,8 @@ import javax.mail.internet.InternetAddress;
|
||||||
@Index(value = {"account"}),
|
@Index(value = {"account"}),
|
||||||
@Index(value = {"folder"}),
|
@Index(value = {"folder"}),
|
||||||
@Index(value = {"identity"}),
|
@Index(value = {"identity"}),
|
||||||
|
@Index(value = {"replying"}),
|
||||||
|
@Index(value = {"forwarding"}),
|
||||||
@Index(value = {"folder", "uid"}, unique = true),
|
@Index(value = {"folder", "uid"}, unique = true),
|
||||||
@Index(value = {"inreplyto"}),
|
@Index(value = {"inreplyto"}),
|
||||||
@Index(value = {"msgid"}),
|
@Index(value = {"msgid"}),
|
||||||
|
|
Loading…
Reference in New Issue