mirror of https://gitlab.com/pamhyr/pamhyr2
Database: upgrade version for temperature data
parent
252ac257fe
commit
c0000bb332
|
|
@ -77,7 +77,7 @@ class Data(SQLSubModel):
|
||||||
created = True
|
created = True
|
||||||
|
|
||||||
if major == "0" and (int(minor) < 2 or
|
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,
|
if not cls.is_table_exists(execute,
|
||||||
"boundary_condition_data_temperature"):
|
"boundary_condition_data_temperature"):
|
||||||
cls._db_create(execute)
|
cls._db_create(execute)
|
||||||
|
|
@ -205,7 +205,7 @@ class BoundaryConditionTemperature(SQLSubModel):
|
||||||
created = False
|
created = False
|
||||||
|
|
||||||
if major == "0" and (int(minor) < 2 or (
|
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,
|
if not cls.is_table_exists(execute,
|
||||||
"boundary_condition_temperature"):
|
"boundary_condition_temperature"):
|
||||||
cls._db_create(execute)
|
cls._db_create(execute)
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ class InitialConditionsTemperature(SQLSubModel):
|
||||||
major, minor, release = version.strip().split(".")
|
major, minor, release = version.strip().split(".")
|
||||||
|
|
||||||
if major == "0":
|
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"
|
table_name = "initial_conditions_temperature"
|
||||||
if not cls.is_table_exists(execute, table_name):
|
if not cls.is_table_exists(execute, table_name):
|
||||||
cls._db_create(execute)
|
cls._db_create(execute)
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ class ICTemperatureSpec(SQLSubModel):
|
||||||
major, minor, release = version.strip().split(".")
|
major, minor, release = version.strip().split(".")
|
||||||
|
|
||||||
if major == "0":
|
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"
|
table_name = "initial_conditions_temperature_spec"
|
||||||
if not cls.is_table_exists(execute, table_name):
|
if not cls.is_table_exists(execute, table_name):
|
||||||
cls._db_create(execute)
|
cls._db_create(execute)
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ logger = logging.getLogger()
|
||||||
|
|
||||||
|
|
||||||
class Study(SQLModel):
|
class Study(SQLModel):
|
||||||
_version = "0.2.7"
|
_version = "0.2.8"
|
||||||
|
|
||||||
_sub_classes = [
|
_sub_classes = [
|
||||||
Scenario,
|
Scenario,
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ class Data(SQLSubModel):
|
||||||
major, minor, release = version.strip().split(".")
|
major, minor, release = version.strip().split(".")
|
||||||
|
|
||||||
if major == "0" and (int(minor) < 2 or
|
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"):
|
if not cls.is_table_exists(execute, "air_temperature_data"):
|
||||||
cls._db_create(execute)
|
cls._db_create(execute)
|
||||||
|
|
||||||
|
|
@ -334,7 +334,7 @@ class WeatherParameters(SQLSubModel):
|
||||||
created = False
|
created = False
|
||||||
|
|
||||||
if major == "0" and (int(minor) < 2 or
|
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"):
|
if not cls.is_table_exists(execute, "air_temperature"):
|
||||||
cls._db_create(execute)
|
cls._db_create(execute)
|
||||||
created = True
|
created = True
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue