From 5d7a935784a6c0d126a0365e01a4098074470753 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Mon, 16 Jul 2018 15:58:38 +0200 Subject: [core] make the offline DB schema a regular include file --- platform/default/mbgl/storage/offline_database.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'platform/default/mbgl/storage/offline_database.cpp') diff --git a/platform/default/mbgl/storage/offline_database.cpp b/platform/default/mbgl/storage/offline_database.cpp index 92e534634d..8f7f0965f4 100644 --- a/platform/default/mbgl/storage/offline_database.cpp +++ b/platform/default/mbgl/storage/offline_database.cpp @@ -6,6 +6,8 @@ #include #include +#include "offline_schema.hpp" + #include "sqlite3.hpp" namespace mbgl { @@ -82,8 +84,6 @@ void OfflineDatabase::ensureSchema() { } try { - #include "offline_schema.cpp.include" - // When downgrading the database, or when the database is corrupt, we've deleted the old database handle, // so we need to reopen it. if (!db) { @@ -95,7 +95,7 @@ void OfflineDatabase::ensureSchema() { db->exec("PRAGMA auto_vacuum = INCREMENTAL"); db->exec("PRAGMA journal_mode = DELETE"); db->exec("PRAGMA synchronous = FULL"); - db->exec(schema); + db->exec(offlineDatabaseSchema); db->exec("PRAGMA user_version = 6"); } catch (...) { Log::Error(Event::Database, "Unexpected error creating database schema: %s", util::toString(std::current_exception()).c_str()); -- cgit v1.2.1