From 6245786289655bbfa0317b869405ba03d1e60dd7 Mon Sep 17 00:00:00 2001 From: anti Date: Sun, 19 Apr 2026 18:04:35 -0400 Subject: [PATCH] fix(cli): db-reset now drops swarm_hosts + decky_shards _DB_RESET_TABLES was missing the swarm tables, so drop-tables mode left them intact. create_all doesn't alter columns on existing tables, so any schema change to SwarmHost (like use_ipvlan) never took effect after a reset. Child FK first (decky_shards -> swarm_hosts). --- decnet/cli.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/decnet/cli.py b/decnet/cli.py index feaf2c8..df40568 100644 --- a/decnet/cli.py +++ b/decnet/cli.py @@ -1627,13 +1627,17 @@ def sniffer_cmd( _DB_RESET_TABLES: tuple[str, ...] = ( - # Order matters for DROP TABLE: attacker_behavior FK-references attackers. + # Order matters for DROP TABLE: child FKs first. + # - attacker_behavior FK-references attackers. + # - decky_shards FK-references swarm_hosts. "attacker_behavior", "attackers", "logs", "bounty", "state", "users", + "decky_shards", + "swarm_hosts", )