-- "I already filed it" suppression for IFTA quarterly reminders.
-- When a carrier clicks the one-click "I already filed it" link in a reminder
-- email, we record it here: it stops further touches THIS cycle (the IFTA
-- builder excludes self-filed carriers) and gives us DIY-vs-prospect signal.
-- Reset each new quarter alongside ifta_reminded_at.

ALTER TABLE fmcsa_carriers
  ADD COLUMN IF NOT EXISTS ifta_self_filed_at TIMESTAMPTZ;

CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_fmcsa_carriers_ifta_self_filed
  ON fmcsa_carriers (ifta_self_filed_at)
  WHERE ifta_self_filed_at IS NULL;
