-- ============================================================================
-- Add platform_url column to platform_settings
-- ============================================================================

-- Add platform_url column if it doesn't exist
ALTER TABLE platform_settings
ADD COLUMN IF NOT EXISTS platform_url TEXT;

-- Set default value if null
UPDATE platform_settings
SET platform_url = 'https://access-hub.com'
WHERE platform_url IS NULL;

-- Add comment
COMMENT ON COLUMN platform_settings.platform_url IS 'Base URL of the platform (used for email links)';
