Wipe book database on this update

This commit is contained in:
mhutti1 2017-11-09 19:05:17 +00:00 committed by Isaac Hutt
parent 2ded689524
commit 6aebb7356b

View File

@ -42,7 +42,7 @@ import java.io.InputStreamReader;
public class KiwixDatabase extends SquidDatabase {
private static final int VERSION = 13;
private static final int VERSION = 14;
private Context context;
private static KiwixDatabase instance = null;
@ -127,6 +127,10 @@ public class KiwixDatabase extends SquidDatabase {
tryAddColumn(BookDatabaseEntity.NAME);
tryAddColumn(Bookmarks.ZIM_NAME);
}
if (newVersion >= 14 && oldVersion < 14) {
tryDropTable(BookDatabaseEntity.TABLE);
tryCreateTable(BookDatabaseEntity.TABLE);
}
return true;
}