mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-04 02:09:35 +02:00
cleanup
This commit is contained in:
parent
621c259a68
commit
d9b061117a
3 changed files with 10 additions and 4 deletions
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue