-- Migration: Add phone_number_id to oauth_states table
-- Description: Support phone number selection in OAuth flows
-- Date: 2025-11-10
-- Related Issue: #65

ALTER TABLE oauth_states
ADD COLUMN IF NOT EXISTS phone_number_id UUID REFERENCES phone_numbers(id) ON DELETE SET NULL;

COMMENT ON COLUMN oauth_states.phone_number_id IS 'Phone number selected before OAuth flow, assigned after successful connection';
