Skip to content

Commit 7a74549

Browse files
Fix #3792 Missing Column Issue (#4468)
* Fix Missing Column Issue * Fix tests
1 parent 38b6aa6 commit 7a74549

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/src/main/java/fr/free/nrw/commons/bookmarks/locations/BookmarkLocationsDao.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -284,22 +284,22 @@ public static void onUpdate(SQLiteDatabase db, int from, int to) {
284284
}
285285
return;
286286
}
287-
if (from == 12) {
287+
if (from >= 12) {
288288
try {
289289
db.execSQL(
290290
"ALTER TABLE bookmarksLocations ADD COLUMN location_destroyed STRING;");
291291
} catch (SQLiteException exception) {
292292
Timber.e(exception);
293293
}
294294
}
295-
if (from == 13){
295+
if (from >= 13){
296296
try {
297297
db.execSQL("ALTER TABLE bookmarksLocations ADD COLUMN location_language STRING;");
298298
} catch (SQLiteException exception){
299299
Timber.e(exception);
300300
}
301301
}
302-
if (from == 14){
302+
if (from >= 14){
303303
try {
304304
db.execSQL("ALTER TABLE bookmarksLocations ADD COLUMN location_exists STRING;");
305305
} catch (SQLiteException exception){

0 commit comments

Comments
 (0)