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 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

View File

@ -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
""" """
) )

View File

@ -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
""" """
) )

View File

@ -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)

View File

@ -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
""" """
) )

View File

@ -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

Binary file not shown.