-- Migration 0003: Add country_code to user_credentials
-- Stores the SIM/dial-code country at registration time for worldwide operator awareness.
-- Also stores carrier/operator name for analytics & call routing.

ALTER TABLE user_credentials
    ADD COLUMN IF NOT EXISTS country_code VARCHAR(8)   DEFAULT NULL,
    ADD COLUMN IF NOT EXISTS carrier_name VARCHAR(128) DEFAULT NULL;

-- index for country-level analytics
CREATE INDEX IF NOT EXISTS idx_user_credentials_country ON user_credentials(country_code);
