-- ============================================
-- MIGRACIÓN 014: índices para rendimiento
-- ============================================

CREATE INDEX idx_tasks_lead_id ON tasks(lead_id);
CREATE INDEX idx_notes_lead_id ON notes(lead_id);
CREATE INDEX idx_lead_status_history_lead_id ON lead_status_history(lead_id);
CREATE INDEX idx_leads_company ON leads(company);
CREATE INDEX idx_leads_city ON leads(city);
CREATE INDEX idx_leads_created_at ON leads(created_at);
CREATE INDEX idx_tasks_status_scheduled ON tasks(status, scheduled_date, scheduled_time);
