diff options
author | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2017-08-21 17:58:27 +0300 |
---|---|---|
committer | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2017-08-21 18:03:15 +0300 |
commit | e0d043f8b03e0f1eba9dbb1f97660f7b793b5a12 (patch) | |
tree | 97361b1633493507e1f10058480b20a2a65181f0 | |
parent | a059c74a54302f9604f3e3b28143be7645e6204f (diff) | |
download | qtlocation-mapboxgl-e0d043f8b03e0f1eba9dbb1f97660f7b793b5a12.tar.gz |
[core] Remove database on schema downgrade
Previously we were throwing an exception.
-rw-r--r-- | platform/default/mbgl/storage/offline_database.cpp | 2 |
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(); |