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
+3 -4
View File
@@ -183,13 +183,12 @@ void Project::setProjectSettingsFilePath(const FilePath& path)
{
loadStorage(path);
Version version = m_storage->getVersion();
if (version.isEmpty())
if (m_storage->isEmpty())
{
m_state = PROJECT_EMPTY;
m_storage->init();
m_storage->setup();
}
else if (version.isDifferentStorageVersionThan(Version::getApplicationVersion()))
else if (m_storage->isIncompatible())
{
m_state = PROJECT_OUTVERSIONED;
m_storage.reset();