mirror of https://gitlab.com/pamhyr/pamhyr2
Results: Fix db update from 0.2.0.
parent
8f6255c2cd
commit
1dd92cb089
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue