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:
2026-04-21 10:23:49 -04:00
parent e75198cca9
commit 1b29a7692c

View File

@@ -12,6 +12,7 @@ _DB_RESET_TABLES: tuple[str, ...] = (
# Order matters for DROP TABLE: child FKs first.
# - attacker_behavior FK-references attackers.
# - decky_shards FK-references swarm_hosts.
# - topology_* children FK-reference topologies / lans / topology_deckies.
"attacker_behavior",
"attackers",
"logs",
@@ -20,6 +21,12 @@ _DB_RESET_TABLES: tuple[str, ...] = (
"users",
"decky_shards",
"swarm_hosts",
"topology_status_events",
"topology_mutations",
"topology_edges",
"topology_deckies",
"lans",
"topologies",
)