mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-28 21:33:53 +01:00
Fix bug #4959 by correctly setting previous db version number and updating the current db version (#4960)
This commit is contained in:
parent
4edabede88
commit
f4414b1c31
3 changed files with 90 additions and 15 deletions
|
|
@ -185,23 +185,17 @@ public class RecentLanguagesDao {
|
|||
if (from == to) {
|
||||
return;
|
||||
}
|
||||
if (from < 6) {
|
||||
if (from < 19) {
|
||||
// doesn't exist yet
|
||||
from++;
|
||||
onUpdate(db, from, to);
|
||||
return;
|
||||
}
|
||||
if (from == 6) {
|
||||
// table added in version 7
|
||||
if (from == 19) {
|
||||
// table added in version 20
|
||||
onCreate(db);
|
||||
from++;
|
||||
onUpdate(db, from, to);
|
||||
return;
|
||||
}
|
||||
if (from == 7) {
|
||||
from++;
|
||||
onUpdate(db, from, to);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue