-- Nadiplayer: reset push/device counters WITHOUT touching users or xtream settings
-- Safe tables to clean:
--   fcm_tokens, fcm_broadcasts, stats_heartbeats, installs
-- Optional legacy table cleanup:
--   devices (only if you want dashboard "Devices registered" back to 0)

START TRANSACTION;

DELETE FROM fcm_broadcasts;
DELETE FROM fcm_tokens;
DELETE FROM stats_heartbeats;
DELETE FROM installs;

-- OPTIONAL (uncomment only if you want to reset legacy paired-device count too):
-- DELETE FROM devices;

COMMIT;

-- Verify after cleanup:
SELECT
  (SELECT COUNT(*) FROM fcm_tokens) AS fcm_tokens_count,
  (SELECT COUNT(*) FROM fcm_broadcasts) AS fcm_broadcasts_count,
  (SELECT COUNT(*) FROM stats_heartbeats) AS stats_heartbeats_count,
  (SELECT COUNT(*) FROM installs) AS installs_count,
  (SELECT COUNT(*) FROM devices) AS devices_count;
