Prepare folder ordering

This commit is contained in:
M66B
2019-04-29 13:09:11 +02:00
parent c42c8d9bea
commit 204c2418a2
4 changed files with 1749 additions and 1 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 = 75,
version = 76,
entities = {
EntityIdentity.class,
EntityAccount.class,
@@ -773,6 +773,13 @@ public abstract class DB extends RoomDatabase {
db.execSQL("ALTER TABLE `folder` ADD COLUMN `navigation` INTEGER NOT NULL DEFAULT 0");
}
})
.addMigrations(new Migration(75, 76) {
@Override
public void migrate(SupportSQLiteDatabase db) {
Log.i("DB migration from version " + startVersion + " to " + endVersion);
db.execSQL("ALTER TABLE `folder` ADD COLUMN `order` INTEGER");
}
})
.build();
}