diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2018-07-16 15:58:38 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2018-07-16 15:58:38 +0200 |
commit | 5d7a935784a6c0d126a0365e01a4098074470753 (patch) | |
tree | f1527e5df8cee6d0764723783d7d52553c9c3996 /platform/default/mbgl/storage/offline_database.cpp | |
parent | a6727921fc1608d341c086cd70341e6df5e79a2b (diff) | |
download | qtlocation-mapboxgl-upstream/make-offline-schema-a-regular-include-header.tar.gz |
[core] make the offline DB schema a regular include fileupstream/make-offline-schema-a-regular-include-header
Diffstat (limited to 'platform/default/mbgl/storage/offline_database.cpp')
-rw-r--r-- | platform/default/mbgl/storage/offline_database.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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 <mbgl/util/chrono.hpp> #include <mbgl/util/logging.hpp> +#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()); |