feat(cli/db): include topology tables in db reset
db reset drops-and-recreates a fixed table set in FK order. Topology tables weren't in the list, so reset left orphan topology rows behind and a fresh MazeNET deploy could collide with stale child records.
This commit is contained in:
@@ -12,6 +12,7 @@ _DB_RESET_TABLES: tuple[str, ...] = (
|
|||||||
# Order matters for DROP TABLE: child FKs first.
|
# Order matters for DROP TABLE: child FKs first.
|
||||||
# - attacker_behavior FK-references attackers.
|
# - attacker_behavior FK-references attackers.
|
||||||
# - decky_shards FK-references swarm_hosts.
|
# - decky_shards FK-references swarm_hosts.
|
||||||
|
# - topology_* children FK-reference topologies / lans / topology_deckies.
|
||||||
"attacker_behavior",
|
"attacker_behavior",
|
||||||
"attackers",
|
"attackers",
|
||||||
"logs",
|
"logs",
|
||||||
@@ -20,6 +21,12 @@ _DB_RESET_TABLES: tuple[str, ...] = (
|
|||||||
"users",
|
"users",
|
||||||
"decky_shards",
|
"decky_shards",
|
||||||
"swarm_hosts",
|
"swarm_hosts",
|
||||||
|
"topology_status_events",
|
||||||
|
"topology_mutations",
|
||||||
|
"topology_edges",
|
||||||
|
"topology_deckies",
|
||||||
|
"lans",
|
||||||
|
"topologies",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user