-- 059: Waive de minimis exemption
--
-- Background: A filer whose Appendix A worksheet shows they qualify as
-- de minimis is EXEMPT from contributing to USF (§ 54.706). But many
-- carriers — especially small VoIP resellers — have a business reason to
-- file as a regular contributing filer even when de minimis qualifies:
--
--   Upstream wholesale SIP providers charge USF surcharges on the trunk
--   bill. A regular contributing carrier can show the vendor their 499
--   Filer ID + a "Reseller Certification" (see table
--   reseller_certifications) and have the vendor waive wholesale-side
--   USF. A de minimis filer cannot — they eat the vendor's USF charge
--   because they don't contribute directly.
--
--   The economic break-even: when the carrier's own USF contribution
--   (interstate revenue * quarterly factor) is LESS than the USF
--   surcharge on wholesale trunking, filing as regular saves money
--   overall even though they'd otherwise be exempt.
--
-- So: give the filer an explicit opt-out. Set waive_deminimis_exemption=TRUE
-- and the handler will file a full 499-A with USF contribution obligations
-- even when the Appendix A calc shows de minimis status.

ALTER TABLE compliance_orders
  ADD COLUMN IF NOT EXISTS waive_deminimis_exemption BOOLEAN NOT NULL DEFAULT FALSE;

-- Why they chose to waive — short free-text so the admin-review dashboard
-- and auditors can see the intent. Not required.
ALTER TABLE compliance_orders
  ADD COLUMN IF NOT EXISTS waive_deminimis_reason TEXT;
