mirror of https://gitlab.com/pamhyr/pamhyr2
Scenario: Clean DB add minimal comment.
parent
42ea50d62e
commit
5ce94a63d3
|
|
@ -228,6 +228,8 @@ class Scenario(SQLSubModel):
|
||||||
|
|
||||||
for table in tables:
|
for table in tables:
|
||||||
if self.parent is None:
|
if self.parent is None:
|
||||||
|
# This scenario is the default scenario, so we can
|
||||||
|
# delete all data marked as deleted
|
||||||
execute(
|
execute(
|
||||||
f"DELETE FROM {table} " +
|
f"DELETE FROM {table} " +
|
||||||
f"WHERE scenario = {self.id} " +
|
f"WHERE scenario = {self.id} " +
|
||||||
|
|
@ -235,6 +237,8 @@ class Scenario(SQLSubModel):
|
||||||
)
|
)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# Select pamhyr_id for each deleted data in this scenario
|
||||||
|
# who do not exists into parents scenarios
|
||||||
ids = execute(
|
ids = execute(
|
||||||
f"""
|
f"""
|
||||||
SELECT pamhyr_id FROM {table}
|
SELECT pamhyr_id FROM {table}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue