-- Add location columns to proxies table
ALTER TABLE proxies
ADD COLUMN city VARCHAR(100),
ADD COLUMN state VARCHAR(100),
ADD COLUMN country VARCHAR(100),
ADD COLUMN country_code VARCHAR(2),
ADD COLUMN location_updated_at TIMESTAMP;

-- Add index for location-based queries
CREATE INDEX idx_proxies_location ON proxies(country_code, state, city);

-- Add the same to failed_proxies table
ALTER TABLE failed_proxies
ADD COLUMN city VARCHAR(100),
ADD COLUMN state VARCHAR(100),
ADD COLUMN country VARCHAR(100),
ADD COLUMN country_code VARCHAR(2),
ADD COLUMN location_updated_at TIMESTAMP;
