mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2333ab540e | ||
|
|
c81d65f527 | ||
|
|
bf44f5c027 | ||
|
|
d1400f12a6 |
No files matched your search
@@ -75,8 +75,8 @@ class Friction(SQLSubModel):
|
|||||||
if major == minor == "0":
|
if major == minor == "0":
|
||||||
if int(release) < 11:
|
if int(release) < 11:
|
||||||
execute("ALTER TABLE friction " +
|
execute("ALTER TABLE friction " +
|
||||||
"RENAME COLUMN begin_rk TO begin_rk")
|
"RENAME COLUMN begin_kp TO begin_rk")
|
||||||
execute("ALTER TABLE friction RENAME COLUMN end_rk TO end_rk")
|
execute("ALTER TABLE friction RENAME COLUMN end_kp TO end_rk")
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ class ProfileXYZ(Profile, SQLSubModel):
|
|||||||
execute(
|
execute(
|
||||||
"""
|
"""
|
||||||
ALTER TABLE geometry_profileXYZ
|
ALTER TABLE geometry_profileXYZ
|
||||||
RENAME COLUMN rk TO rk
|
RENAME COLUMN kp TO rk
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -94,13 +94,13 @@ class HydraulicStructure(SQLSubModel):
|
|||||||
execute(
|
execute(
|
||||||
"""
|
"""
|
||||||
ALTER TABLE hydraulic_structures
|
ALTER TABLE hydraulic_structures
|
||||||
RENAME COLUMN input_rk TO input_rk
|
RENAME COLUMN input_kp TO input_rk
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
execute(
|
execute(
|
||||||
"""
|
"""
|
||||||
ALTER TABLE hydraulic_structures
|
ALTER TABLE hydraulic_structures
|
||||||
RENAME COLUMN output_rk TO output_rk
|
RENAME COLUMN output_kp TO output_rk
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ class Data(SQLSubModel):
|
|||||||
if major == minor == "0":
|
if major == minor == "0":
|
||||||
if int(release) < 11:
|
if int(release) < 11:
|
||||||
execute(
|
execute(
|
||||||
"ALTER TABLE initial_conditions RENAME COLUMN rk TO rk"
|
"ALTER TABLE initial_conditions RENAME COLUMN kp TO rk"
|
||||||
)
|
)
|
||||||
|
|
||||||
return cls._update_submodel(execute, version)
|
return cls._update_submodel(execute, version)
|
||||||
|
|||||||
@@ -93,13 +93,13 @@ class LateralContribution(SQLSubModel):
|
|||||||
execute(
|
execute(
|
||||||
"""
|
"""
|
||||||
ALTER TABLE lateral_contribution
|
ALTER TABLE lateral_contribution
|
||||||
RENAME COLUMN begin_rk TO begin_rk
|
RENAME COLUMN begin_kp TO begin_rk
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
execute(
|
execute(
|
||||||
"""
|
"""
|
||||||
ALTER TABLE lateral_contribution
|
ALTER TABLE lateral_contribution
|
||||||
RENAME COLUMN end_rk TO end_rk
|
RENAME COLUMN end_kp TO end_rk
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ class SQLModel(SQL):
|
|||||||
self._create() # Create db
|
self._create() # Create db
|
||||||
# self._save() # Save
|
# self._save() # Save
|
||||||
else:
|
else:
|
||||||
|
logger.info("Update database")
|
||||||
self._update() # Update db scheme if necessary
|
self._update() # Update db scheme if necessary
|
||||||
# self._load() # Load data
|
# self._load() # Load data
|
||||||
|
|
||||||
|
|||||||
@@ -142,17 +142,6 @@ class Config(SQL):
|
|||||||
"WHERE name='default-mage'"
|
"WHERE name='default-mage'"
|
||||||
)
|
)
|
||||||
|
|
||||||
self.execute(f"""
|
|
||||||
INSERT INTO solver VALUES (
|
|
||||||
'mage_fake7',
|
|
||||||
'default-mage-fake-7',
|
|
||||||
'Default Pamhyr2 mage fake version 7',
|
|
||||||
'', '', '',
|
|
||||||
'',
|
|
||||||
'@install_dir/mage8/mage_as7{ext} @args @input',
|
|
||||||
''
|
|
||||||
)
|
|
||||||
""")
|
|
||||||
if int(release) < 6:
|
if int(release) < 6:
|
||||||
posix = os.name == 'posix'
|
posix = os.name == 'posix'
|
||||||
ext = "" if posix else ".exe"
|
ext = "" if posix else ".exe"
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in new issue
Block a user