-- Investor data masking: track first activity and enforce 72h anonymization window
ALTER TABLE pitch_investors
  ADD COLUMN IF NOT EXISTS first_activity_at TIMESTAMPTZ,
  ADD COLUMN IF NOT EXISTS data_masked_at TIMESTAMPTZ;

-- Partial index for fast masking-eligibility scans
CREATE INDEX IF NOT EXISTS idx_pitch_investors_mask_check
  ON pitch_investors (first_activity_at)
  WHERE first_activity_at IS NOT NULL AND data_masked_at IS NULL;
