summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <tmpsantos@gmail.com>2017-08-21 17:58:27 +0300
committerJason Wray <jason@mapbox.com>2017-08-29 14:08:30 -0400
commit9c4071fe8684e320d398a2f8bdcfbdffdd64ec68 (patch)
tree7ecf0a9e6eba255cb268bdf9f17c1fd06514e7f0
parente78620c70567a995a6f02ae3ee85cc5dd7f3fade (diff)
downloadqtlocation-mapboxgl-9c4071fe8684e320d398a2f8bdcfbdffdd64ec68.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 02736f10a4..204ee04c92 100644
--- a/platform/default/mbgl/storage/offline_database.cpp
+++ b/platform/default/mbgl/storage/offline_database.cpp
@@ -50,7 +50,7 @@ void OfflineDatabase::ensureSchema() {
case 3: // no-op and fall through
case 4: migrateToVersion5(); // fall through
case 5: return;
- default: throw std::runtime_error("unknown schema version");
+ default: break; // downgrade, delete the database
}
removeExisting();