mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
AdistTS: Fix update with table exists tests.
This commit is contained in:
1 parent
e79ae8ebf5
commit
229b3da2d1
11 files changed
+50
-78
No files matched your search
@@ -69,14 +69,11 @@ class Data(SQLSubModel):
|
||||
major, minor, release = version.strip().split(".")
|
||||
created = False
|
||||
|
||||
if major == "0" and minor == "0":
|
||||
if int(release) < 11:
|
||||
cls._db_create(execute)
|
||||
created = True
|
||||
|
||||
if major == "0" and int(minor) < 2:
|
||||
if not created:
|
||||
if cls.is_table_exists(execute, "lateral_contribution_data_adists"):
|
||||
cls._db_update_to_0_2_0(execute, data)
|
||||
else:
|
||||
cls._db_create(execute)
|
||||
|
||||
return True
|
||||
|
||||
@@ -243,15 +240,13 @@ class LateralContributionAdisTS(SQLSubModel):
|
||||
major, minor, release = version.strip().split(".")
|
||||
created = False
|
||||
|
||||
if major == "0" and minor == "0":
|
||||
if int(release) < 11:
|
||||
if major == "0" and int(minor) < 2:
|
||||
if cls.is_table_exists(execute, "lateral_contribution_adists"):
|
||||
cls._db_update_to_0_2_0(execute, data)
|
||||
else:
|
||||
cls._db_create(execute)
|
||||
created = True
|
||||
|
||||
if major == "0" and int(minor) < 2:
|
||||
if not created:
|
||||
cls._db_update_to_0_2_0(execute, data)
|
||||
|
||||
if not created:
|
||||
return cls._update_submodel(execute, version, data)
|
||||
|
||||
|
||||
Reference in new issue
Block a user