Always insert the current version

This commit is contained in:
Carsten Larsen 2016-12-14 21:34:36 +01:00
parent cd2135aca1
commit f55fa07a23
1 changed files with 6 additions and 0 deletions

View File

@ -130,6 +130,12 @@ public bool CheckLatestVersion()
int databaseVersion = controller.FindCurrentVersion();
var latest = changes.OrderBy(c => c.VersionNumber).Last();
if (databaseVersion == -1)
{
controller.SetCurrentVersion(latest);
return true;
}
if (databaseVersion == latest.VersionNumber)
return true;