-- Cumulative packet counters (survive policy re-apply / nft chain recreate).
ALTER TABLE agents ADD COLUMN total_packets_dropped INTEGER NOT NULL DEFAULT 0;
ALTER TABLE agents ADD COLUMN total_packets_accepted INTEGER NOT NULL DEFAULT 0;

-- Seed from last snapshot so existing fleet doesn't jump to zero.
UPDATE agents
SET
  total_packets_dropped = COALESCE(last_apply_packets_dropped, 0),
  total_packets_accepted = COALESCE(last_apply_packets_accepted, 0);
