Added option to auto delete old trashed messages

This commit is contained in:
M66B
2019-05-01 11:26:32 +02:00
parent 71daa71624
commit dc70bc540c
8 changed files with 1805 additions and 24 deletions

View File

@@ -51,7 +51,7 @@ import io.requery.android.database.sqlite.RequerySQLiteOpenHelperFactory;
// https://developer.android.com/topic/libraries/architecture/room.html
@Database(
version = 77,
version = 78,
entities = {
EntityIdentity.class,
EntityAccount.class,
@@ -787,6 +787,13 @@ public abstract class DB extends RoomDatabase {
db.execSQL("ALTER TABLE `folder` ADD COLUMN `read_only` INTEGER NOT NULL DEFAULT 0");
}
})
.addMigrations(new Migration(77, 78) {
@Override
public void migrate(SupportSQLiteDatabase db) {
Log.i("DB migration from version " + startVersion + " to " + endVersion);
db.execSQL("ALTER TABLE `folder` ADD COLUMN `auto_delete` INTEGER NOT NULL DEFAULT 0");
}
})
.build();
}