From 9c4071fe8684e320d398a2f8bdcfbdffdd64ec68 Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Mon, 21 Aug 2017 17:58:27 +0300 Subject: [PATCH] [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 02736f10a..204ee04c9 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();