Merge branch '2.12-release'

This commit is contained in:
Josephine Lim 2019-12-10 23:52:22 +10:00
commit e23b80dfcd
2 changed files with 8 additions and 1 deletions

View file

@ -19,6 +19,7 @@ import fr.free.nrw.commons.location.LatLng;
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;
@ -239,6 +240,7 @@ public class BookmarkLocationsDao {
}
public static void onUpdate(SQLiteDatabase db, int from, int to) {
Timber.d("bookmarksLocations db is updated from:"+from+", to:"+to);
if (from == to) {
return;
}
@ -260,6 +262,11 @@ public class BookmarkLocationsDao {
onUpdate(db, from, to);
return;
}
if (from == 10 && to == 11) {
from++;
db.execSQL("ALTER TABLE bookmarksLocations ADD COLUMN location_pic STRING;");
return;
}
}
}
}

View file

@ -13,7 +13,7 @@ import fr.free.nrw.commons.explore.recentsearches.RecentSearchesDao;
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