-- Fixes for lead/customer communication logging and country save support
ALTER TABLE communications
  ADD COLUMN IF NOT EXISTS lead_id INT NULL AFTER source_type;

CREATE INDEX IF NOT EXISTS idx_communications_lead_id ON communications (lead_id);
CREATE INDEX IF NOT EXISTS idx_country_account_account_country ON country_account (account_id, country_id);
