summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <tmpsantos@gmail.com>2017-08-21 17:58:27 +0300
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2017-08-22 12:46:38 +0300
commit558d4b1a88c5b8367a073fc428b2843f28555d96 (patch)
treeac2f7f350e1985124c7018e559300fca679ac290
parent224e9e6261e332dc97b3fad3be58f3146d07b280 (diff)
downloadqtlocation-mapboxgl-558d4b1a88c5b8367a073fc428b2843f28555d96.tar.gz
[core] Remove database on schema downgrade
Previously we were throwing an exception.
-rw-r--r--platform/default/mbgl/storage/offline_database.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/default/mbgl/storage/offline_database.cpp b/platform/default/mbgl/storage/offline_database.cpp
index d38f0c9108..65c2097182 100644
--- a/platform/default/mbgl/storage/offline_database.cpp
+++ b/platform/default/mbgl/storage/offline_database.cpp
@@ -51,7 +51,7 @@ void OfflineDatabase::ensureSchema() {
case 4: migrateToVersion5(); // fall through
case 5: migrateToVersion6(); // fall through
case 6: return;
- default: throw std::runtime_error("unknown schema version");
+ default: break; // downgrade, delete the database
}
removeExisting();