mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
* Update tables from 10 to 11 * Remove unneeded changes
This commit is contained in:
parent
bf4b73103f
commit
959b3afd4c
2 changed files with 8 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue