compare_results
Theophile Terraz 2024-12-20 15:41:19 +01:00
parent c610717220
commit d1400f12a6
7 changed files with 9 additions and 8 deletions

View File

@ -75,8 +75,8 @@ class Friction(SQLSubModel):
if major == minor == "0":
if int(release) < 11:
execute("ALTER TABLE friction " +
"RENAME COLUMN begin_rk TO begin_rk")
execute("ALTER TABLE friction RENAME COLUMN end_rk TO end_rk")
"RENAME COLUMN begin_kp TO begin_rk")
execute("ALTER TABLE friction RENAME COLUMN end_kp TO end_rk")
return True

View File

@ -108,7 +108,7 @@ class ProfileXYZ(Profile, SQLSubModel):
execute(
"""
ALTER TABLE geometry_profileXYZ
RENAME COLUMN rk TO rk
RENAME COLUMN kp TO rk
"""
)

View File

@ -94,13 +94,13 @@ class HydraulicStructure(SQLSubModel):
execute(
"""
ALTER TABLE hydraulic_structures
RENAME COLUMN input_rk TO input_rk
RENAME COLUMN input_kp TO input_rk
"""
)
execute(
"""
ALTER TABLE hydraulic_structures
RENAME COLUMN output_rk TO output_rk
RENAME COLUMN output_kp TO output_rk
"""
)

View File

@ -80,7 +80,7 @@ class Data(SQLSubModel):
if major == minor == "0":
if int(release) < 11:
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)

View File

@ -93,13 +93,13 @@ class LateralContribution(SQLSubModel):
execute(
"""
ALTER TABLE lateral_contribution
RENAME COLUMN begin_rk TO begin_rk
RENAME COLUMN begin_kp TO begin_rk
"""
)
execute(
"""
ALTER TABLE lateral_contribution
RENAME COLUMN end_rk TO end_rk
RENAME COLUMN end_kp TO end_rk
"""
)

View File

@ -50,6 +50,7 @@ class SQLModel(SQL):
self._create() # Create db
# self._save() # Save
else:
logger.info("Update database")
self._update() # Update db scheme if necessary
# self._load() # Load data

Binary file not shown.