data: Store separate storage version number in SqliteStorage for managing migrations

* deprecated the third version number as storage update number
* version can now have either 3 or 4 numbers
* whether a .coatidb file is outdated is now solely determined by the SqliteStorage::STORAGE_VERSION
This commit is contained in:
Eberhard Graether
2016-07-20 14:14:21 +02:00
parent eb8808b624
commit cb869c2465
8 changed files with 103 additions and 78 deletions
+10 -5
View File
@@ -238,14 +238,19 @@ FilePath PersistentStorage::getDbFilePath() const
return m_sqliteStorage.getDbFilePath();
}
Version PersistentStorage::getVersion() const
bool PersistentStorage::isEmpty() const
{
return m_sqliteStorage.getVersion();
return m_sqliteStorage.isEmpty();
}
void PersistentStorage::init()
bool PersistentStorage::isIncompatible() const
{
m_sqliteStorage.init();
return m_sqliteStorage.isIncompatible();
}
void PersistentStorage::setup()
{
m_sqliteStorage.setup();
}
void PersistentStorage::clear()
@@ -365,7 +370,7 @@ void PersistentStorage::startParsing()
{
MessageClearErrorCount().dispatch();
m_sqliteStorage.setVersion(Version::getApplicationVersion());
m_sqliteStorage.setVersion();
}
void PersistentStorage::finishParsing()