Fixed/improved folder synchronization

This commit is contained in:
M66B
2018-12-22 12:40:47 +01:00
parent 14bc4bd7b6
commit cf185bb744
7 changed files with 1290 additions and 22 deletions

View File

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