mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Database: upgrade version for temperature data
This commit is contained in:
1 parent
252ac257fe
commit
c0000bb332
5 files changed
+7
-7
No files matched your search
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ logger = logging.getLogger()
|
||||
|
||||
|
||||
class Study(SQLModel):
|
||||
_version = "0.2.7"
|
||||
_version = "0.2.8"
|
||||
|
||||
_sub_classes = [
|
||||
Scenario,
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user