-- Add tarique@saventh.com to Corporate (corp_representatives) for grid access
-- tarique@saventh.com already in CRM users (20250220220000)
-- Learn + Investor: allow all authenticated (no migration needed)
INSERT INTO corp_representatives (corp_id, name, email, role)
SELECT 
  (SELECT id FROM corp_master ORDER BY created_at LIMIT 1),
  'Tarique Khan',
  'tarique@saventh.com',
  'representative'
WHERE NOT EXISTS (SELECT 1 FROM corp_representatives WHERE email = 'tarique@saventh.com')
  AND EXISTS (SELECT 1 FROM corp_master LIMIT 1);
