Move store sent option to identy

This commit is contained in:
M66B
2018-08-25 14:24:26 +00:00
parent 5a4b19fc42
commit 1914d45dce
9 changed files with 835 additions and 26 deletions

View File

@@ -45,7 +45,7 @@ import androidx.sqlite.db.SupportSQLiteDatabase;
// https://developer.android.com/topic/libraries/architecture/room.html
@Database(
version = 2,
version = 3,
entities = {
EntityIdentity.class,
EntityAccount.class,
@@ -118,6 +118,13 @@ public abstract class DB extends RoomDatabase {
db.execSQL("ALTER TABLE `account` ADD COLUMN `poll_interval` INTEGER NOT NULL DEFAULT 9");
}
})
.addMigrations(new Migration(2, 3) {
@Override
public void migrate(SupportSQLiteDatabase db) {
Log.i(Helper.TAG, "DB migration from version " + startVersion + " to " + endVersion);
db.execSQL("ALTER TABLE `identity` ADD COLUMN `store_sent` INTEGER NOT NULL DEFAULT 0");
}
})
.build();
}