From 1b29a7692c3ac0526c43aa07560075a9f072110f Mon Sep 17 00:00:00 2001 From: anti Date: Tue, 21 Apr 2026 10:23:49 -0400 Subject: [PATCH] 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. --- decnet/cli/db.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/decnet/cli/db.py b/decnet/cli/db.py index 73c9430c..eb0a2179 100644 --- a/decnet/cli/db.py +++ b/decnet/cli/db.py @@ -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", )