mirror of https://gitlab.com/pamhyr/pamhyr2
DB: Some fixes for update 0.1.0.
parent
b9ca6bf4a9
commit
d2e5eecf22
|
|
@ -189,7 +189,7 @@ class Friction(SQLSubModel):
|
||||||
|
|
||||||
execute(
|
execute(
|
||||||
"INSERT INTO " +
|
"INSERT INTO " +
|
||||||
"friction(id, ind, begin_rk, end_rk, " +
|
"friction(pamhyr_id, ind, begin_rk, end_rk, " +
|
||||||
"reach, begin_strickler, end_strickler) " +
|
"reach, begin_strickler, end_strickler) " +
|
||||||
"VALUES (" +
|
"VALUES (" +
|
||||||
f"{self.id}, {ind}, " +
|
f"{self.id}, {ind}, " +
|
||||||
|
|
|
||||||
|
|
@ -218,7 +218,7 @@ class ProfileXYZ(Profile, SQLSubModel):
|
||||||
|
|
||||||
execute(
|
execute(
|
||||||
"INSERT OR REPLACE INTO " +
|
"INSERT OR REPLACE INTO " +
|
||||||
"geometry_profileXYZ(id, ind, name, reach, " +
|
"geometry_profileXYZ(pamhyr_id, ind, name, reach, " +
|
||||||
"rk, num, code1, code2, sl) " +
|
"rk, num, code1, code2, sl) " +
|
||||||
"VALUES (" +
|
"VALUES (" +
|
||||||
f"{self.pamhyr_id}, {ind}, '{self._db_format(self._name)}', " +
|
f"{self.pamhyr_id}, {ind}, '{self._db_format(self._name)}', " +
|
||||||
|
|
|
||||||
|
|
@ -329,7 +329,7 @@ class LateralContribution(SQLSubModel):
|
||||||
|
|
||||||
sql = (
|
sql = (
|
||||||
"INSERT INTO " +
|
"INSERT INTO " +
|
||||||
"lateral_contribution(id, name, type, tab, " +
|
"lateral_contribution(pamhyr_id, name, type, tab, " +
|
||||||
"reach, begin_section, end_section) " +
|
"reach, begin_section, end_section) " +
|
||||||
"VALUES (" +
|
"VALUES (" +
|
||||||
f"{self.id}, '{self._db_format(self._name)}', " +
|
f"{self.id}, '{self._db_format(self._name)}', " +
|
||||||
|
|
|
||||||
|
|
@ -270,7 +270,7 @@ class Reservoir(SQLSubModel):
|
||||||
|
|
||||||
sql = (
|
sql = (
|
||||||
"INSERT INTO " +
|
"INSERT INTO " +
|
||||||
"reservoir(id, name, node) " +
|
"reservoir(pamhyr_id, name, node) " +
|
||||||
"VALUES (" +
|
"VALUES (" +
|
||||||
f"{self.pamhyr_id}, '{self._db_format(self._name)}', " +
|
f"{self.pamhyr_id}, '{self._db_format(self._name)}', " +
|
||||||
f"{node_id}" +
|
f"{node_id}" +
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue