mirror of https://github.com/M66B/FairEmail.git
Added index on operation name
This commit is contained in:
parent
1f80732916
commit
1a14a802b2
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 = 48,
|
||||
version = 49,
|
||||
entities = {
|
||||
EntityIdentity.class,
|
||||
EntityAccount.class,
|
||||
|
@ -530,6 +530,13 @@ public abstract class DB extends RoomDatabase {
|
|||
db.execSQL("UPDATE `identity` SET use_ip = 1");
|
||||
}
|
||||
})
|
||||
.addMigrations(new Migration(48, 49) {
|
||||
@Override
|
||||
public void migrate(SupportSQLiteDatabase db) {
|
||||
Log.i("DB migration from version " + startVersion + " to " + endVersion);
|
||||
db.execSQL("CREATE INDEX `index_operation_name` ON `operation` (`name`)");
|
||||
}
|
||||
})
|
||||
.build();
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,8 @@ import static androidx.room.ForeignKey.CASCADE;
|
|||
},
|
||||
indices = {
|
||||
@Index(value = {"folder"}),
|
||||
@Index(value = {"message"})
|
||||
@Index(value = {"message"}),
|
||||
@Index(value = {"name"})
|
||||
}
|
||||
)
|
||||
public class EntityOperation {
|
||||
|
|
Loading…
Reference in New Issue