From 558d4b1a88c5b8367a073fc428b2843f28555d96 Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Mon, 21 Aug 2017 17:58:27 +0300 Subject: [core] Remove database on schema downgrade Previously we were throwing an exception. --- platform/default/mbgl/storage/offline_database.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); -- cgit v1.2.1