Results: Fix db update from 0.2.0.

This commit is contained in:
parouby committed 2025-09-26 15:12:19 +02:00
1 parent 8f6255c2cd
commit 1dd92cb089
5 files changed
+6 -4

No files matched your search

+1 -1
View File
@@ -102,7 +102,7 @@ class OutputRKAdists(SQLSubModel):
cls._db_create(execute)
created = True
if major == "0" and int(minor) <= 2:
if major == "0" and int(minor) < 2:
if not created:
cls._db_update_to_0_2_0(execute, data)
+1
View File
@@ -118,6 +118,7 @@ class Results(SQLSubModel):
major, minor, release = version.strip().split(".")
if major == "0" and int(minor) <= 2:
if int(release) < 1:
cls._db_create(execute)
return cls._update_submodel(execute, version, data)
+1
View File
@@ -107,6 +107,7 @@ class Profile(SQLSubModel):
major, minor, release = version.strip().split(".")
if major == "0" and int(minor) <= 2:
if int(release) < 1:
cls._db_create(execute)
return cls._update_submodel(execute, version, data)
+1 -1
View File
@@ -94,7 +94,7 @@ class Scenario(SQLSubModel):
def _db_update(cls, execute, version, data=None):
major, minor, release = version.strip().split(".")
if major == "0" and int(minor) <= 2:
if major == "0" and int(minor) < 2:
cls._db_create(execute)
cls._db_add_default(execute)
+2 -2
View File
@@ -38,7 +38,7 @@ logger = logging.getLogger()
class Study(SQLModel):
_version = "0.2.0"
_version = "0.2.1"
_sub_classes = [
Scenario,
@@ -276,7 +276,7 @@ class Study(SQLModel):
"INSERT INTO info VALUES ('study_release', '0')"
)
if major == "0" and int(minor) <= 2:
if major == "0" and int(minor) < 2:
self._add_into_info_if_not_exists('current_scenario', '0')
if major == "0" and int(minor) < 2: