diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-03-26 13:33:17 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-03-26 13:33:17 +0200 |
commit | 29f80e6e4d698217933b7bd2df90c08162416d3f (patch) | |
tree | 324c496b016b694a3ee963e7ff29d21dcc36426c /common/pipeline.cpp | |
parent | a9c40f85cf9487ab684c35d564a603e28ae63066 (diff) | |
download | sink-29f80e6e4d698217933b7bd2df90c08162416d3f.tar.gz sink-29f80e6e4d698217933b7bd2df90c08162416d3f.zip |
Don't just set the db version, only when we create the db first.
Diffstat (limited to 'common/pipeline.cpp')
-rw-r--r-- | common/pipeline.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/common/pipeline.cpp b/common/pipeline.cpp index 434f732..ee9d3af 100644 --- a/common/pipeline.cpp +++ b/common/pipeline.cpp | |||
@@ -63,9 +63,7 @@ public: | |||
63 | Pipeline::Pipeline(const ResourceContext &context, const Sink::Log::Context &ctx) : QObject(nullptr), d(new Private(context, ctx)) | 63 | Pipeline::Pipeline(const ResourceContext &context, const Sink::Log::Context &ctx) : QObject(nullptr), d(new Private(context, ctx)) |
64 | { | 64 | { |
65 | //Create main store immediately on first start | 65 | //Create main store immediately on first start |
66 | auto store = Sink::Storage::DataStore(Sink::storageLocation(), context.instanceId(), Sink::Storage::DataStore::ReadWrite); | 66 | d->entityStore.createIfMissing(); |
67 | auto t = store.createTransaction(Storage::DataStore::ReadWrite); | ||
68 | Storage::DataStore::setDatabaseVersion(t, Sink::latestDatabaseVersion()); | ||
69 | } | 67 | } |
70 | 68 | ||
71 | Pipeline::~Pipeline() | 69 | Pipeline::~Pipeline() |