Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import fr.free.nrw.commons.nearby.Label;
import fr.free.nrw.commons.nearby.Place;
import fr.free.nrw.commons.nearby.Sitelinks;
import timber.log.Timber;

import static fr.free.nrw.commons.bookmarks.locations.BookmarkLocationsContentProvider.BASE_URI;

Expand Down Expand Up @@ -239,6 +240,7 @@ public static void onDelete(SQLiteDatabase db) {
}

public static void onUpdate(SQLiteDatabase db, int from, int to) {
Timber.d("bookmarksLocations db is updated from:"+from+", to:"+to);
if (from == to) {
return;
}
Expand All @@ -260,6 +262,11 @@ public static void onUpdate(SQLiteDatabase db, int from, int to) {
onUpdate(db, from, to);
return;
}
if (from == 10 && to == 11) {
from++;
db.execSQL("ALTER TABLE bookmarksLocations ADD COLUMN location_pic STRING;");
return;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
public class DBOpenHelper extends SQLiteOpenHelper {

private static final String DATABASE_NAME = "commons.db";
private static final int DATABASE_VERSION = 10;
private static final int DATABASE_VERSION = 11;

/**
* Do not use directly - @Inject an instance where it's needed and let
Expand Down