Move by APPEND/DELETE if no MOVE capability

This commit is contained in:
M66B
2018-08-06 20:03:06 +00:00
parent 553a467ca0
commit 0aaf2e948f
6 changed files with 22 additions and 58 deletions

View File

@@ -41,7 +41,7 @@ import android.util.Log;
EntityAttachment.class,
EntityOperation.class
},
version = 5,
version = 4,
exportSchema = true
)
@@ -78,7 +78,6 @@ public abstract class DB extends RoomDatabase {
.addMigrations(MIGRATION_1_2)
.addMigrations(MIGRATION_2_3)
.addMigrations(MIGRATION_3_4)
.addMigrations(MIGRATION_4_5)
.build();
}
@@ -114,14 +113,6 @@ public abstract class DB extends RoomDatabase {
}
};
private static final Migration MIGRATION_4_5 = new Migration(4, 5) {
@Override
public void migrate(SupportSQLiteDatabase db) {
Log.i(Helper.TAG, "DB migration from version " + startVersion + " to " + endVersion);
db.execSQL("ALTER TABLE `account` ADD COLUMN `capabilities` TEXT NOT NULL DEFAULT ''");
}
};
public static class Converters {
@TypeConverter
public static String[] fromStringArray(String value) {