1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-04 02:09:35 +02:00
This commit is contained in:
Nikolay Pultsin 2013-01-14 06:22:13 +04:00
parent 621c259a68
commit d9b061117a
3 changed files with 10 additions and 4 deletions

View file

@ -72,7 +72,7 @@ public final class SQLiteBooksDatabase extends BooksDatabase {
private void migrate(Context context) {
final int version = myDatabase.getVersion();
final int currentVersion = 19;
final int currentVersion = 20;
if (version >= currentVersion) {
return;
}
@ -119,6 +119,8 @@ public final class SQLiteBooksDatabase extends BooksDatabase {
updateTables17();
case 18:
updateTables18();
case 19:
updateTables19();
}
myDatabase.setTransactionSuccessful();
myDatabase.setVersion(currentVersion);
@ -710,7 +712,7 @@ public final class SQLiteBooksDatabase extends BooksDatabase {
myRemoveFromFavoritesStatement.execute();
}
protected List<Long> loadFavoritesIds() {
protected List<Long> loadFavoriteIds() {
final Cursor cursor = myDatabase.rawQuery(
"SELECT book_id FROM Favorites", null
);
@ -1241,4 +1243,8 @@ public final class SQLiteBooksDatabase extends BooksDatabase {
cursor.close();
myDatabase.execSQL("DROP TABLE BookSeries_Obsolete");
}
private void updateTables19() {
myDatabase.execSQL("DROP TABLE BookList");
}
}