Database: upgrade version for temperature data

temperature_test
Dylan Jeannin 2026-08-11 11:47:34 +02:00
parent 252ac257fe
commit c0000bb332
5 changed files with 7 additions and 7 deletions

View File

@ -77,7 +77,7 @@ class Data(SQLSubModel):
created = True
if major == "0" and (int(minor) < 2 or
(int(minor) == 2 and int(release) < 7)):
(int(minor) == 2 and int(release) <= 7)):
if not cls.is_table_exists(execute,
"boundary_condition_data_temperature"):
cls._db_create(execute)
@ -205,7 +205,7 @@ class BoundaryConditionTemperature(SQLSubModel):
created = False
if major == "0" and (int(minor) < 2 or (
int(minor) == 2 and int(release) < 7)):
int(minor) == 2 and int(release) <= 7)):
if not cls.is_table_exists(execute,
"boundary_condition_temperature"):
cls._db_create(execute)

View File

@ -68,7 +68,7 @@ class InitialConditionsTemperature(SQLSubModel):
major, minor, release = version.strip().split(".")
if major == "0":
if int(minor) < 2 or (int(minor) == 2 and int(release) < 7):
if int(minor) < 2 or (int(minor) == 2 and int(release) <= 7):
table_name = "initial_conditions_temperature"
if not cls.is_table_exists(execute, table_name):
cls._db_create(execute)

View File

@ -70,7 +70,7 @@ class ICTemperatureSpec(SQLSubModel):
major, minor, release = version.strip().split(".")
if major == "0":
if int(minor) < 2 or (int(minor) == 2 and int(release) < 7):
if int(minor) < 2 or (int(minor) == 2 and int(release) <= 7):
table_name = "initial_conditions_temperature_spec"
if not cls.is_table_exists(execute, table_name):
cls._db_create(execute)

View File

@ -46,7 +46,7 @@ logger = logging.getLogger()
class Study(SQLModel):
_version = "0.2.7"
_version = "0.2.8"
_sub_classes = [
Scenario,

View File

@ -73,7 +73,7 @@ class Data(SQLSubModel):
major, minor, release = version.strip().split(".")
if major == "0" and (int(minor) < 2 or
(int(minor) == 2 and int(release) < 7)):
(int(minor) == 2 and int(release) <= 7)):
if not cls.is_table_exists(execute, "air_temperature_data"):
cls._db_create(execute)
@ -334,7 +334,7 @@ class WeatherParameters(SQLSubModel):
created = False
if major == "0" and (int(minor) < 2 or
(int(minor) == 2 and int(release) < 7)):
(int(minor) == 2 and int(release) <= 7)):
if not cls.is_table_exists(execute, "air_temperature"):
cls._db_create(execute)
created = True