add a tested fix for the database changes

This commit is contained in:
dkanada 2021-05-19 02:57:45 +09:00
commit dddb7edf6e
2 changed files with 5 additions and 1 deletions

View file

@ -58,8 +58,10 @@ public abstract class JellyDatabase extends RoomDatabase {
public static final Migration Migration5 = new Migration(4, 5) {
@Override
public void migrate(@NonNull SupportSQLiteDatabase database) {
database.execSQL("ALTER TABLE songs ADD COLUMN cache INTEGER NOT NULL DEFAULT 1");
database.execSQL("CREATE TABLE cache (id TEXT NOT NULL PRIMARY KEY,"
+ "cache INTEGER NOT NULL DEFAULT '1')");
+ "cache INTEGER NOT NULL DEFAULT 1)");
}
};
}