mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-02 19:10:11 +01:00
POP3: added leave on device option
This commit is contained in:
@@ -58,7 +58,7 @@ import io.requery.android.database.sqlite.SQLiteDatabase;
|
||||
// https://developer.android.com/topic/libraries/architecture/room.html
|
||||
|
||||
@Database(
|
||||
version = 132,
|
||||
version = 133,
|
||||
entities = {
|
||||
EntityIdentity.class,
|
||||
EntityAccount.class,
|
||||
@@ -1271,6 +1271,15 @@ public abstract class DB extends RoomDatabase {
|
||||
db.execSQL("ALTER TABLE `message` ADD COLUMN `ui_encrypt` INTEGER");
|
||||
db.execSQL("UPDATE `message` SET `ui_encrypt` = `encrypt`");
|
||||
}
|
||||
})
|
||||
.addMigrations(new Migration(132, 133) {
|
||||
@Override
|
||||
public void migrate(@NonNull SupportSQLiteDatabase db) {
|
||||
Log.i("DB migration from version " + startVersion + " to " + endVersion);
|
||||
db.execSQL("ALTER TABLE `account` ADD COLUMN `leave_on_server` INTEGER NOT NULL DEFAULT 1");
|
||||
db.execSQL("ALTER TABLE `account` ADD COLUMN `leave_on_device` INTEGER NOT NULL DEFAULT 0");
|
||||
db.execSQL("UPDATE `account` SET `leave_on_server` = `browse` WHERE `pop` = " + EntityAccount.TYPE_POP);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user