[core] Added versioning to the cache database

Force drop the table when the version doesn't match. Previously
it was assumed (my bad) that CREATE TABLE IF NOT EXISTS would
compare the table schema, which is not true.
This commit is contained in:
Thiago Marcos P. Santos
2016-01-05 16:28:59 +02:00
parent f80673b15c
commit a5987afeb9
2 changed files with 39 additions and 2 deletions

View File

@@ -42,6 +42,9 @@ private:
void createDatabase();
void createSchema();
int schemaVersion() const;
void ensureSchemaVersion();
int pageSize = 0;
uint64_t maximumCacheSize;