-- Add google_oauth_config column to platform_settings table
-- This replaces google_service_account_json for personal Gmail accounts

ALTER TABLE platform_settings
ADD COLUMN IF NOT EXISTS google_oauth_config jsonb;

-- Add comment
COMMENT ON COLUMN platform_settings.google_oauth_config IS 'OAuth2 configuration for Google Calendar API (for personal Gmail accounts). Format: {"client_id": "...", "client_secret": "...", "refresh_token": "..."}';

-- Note: The old google_service_account_json column can be dropped later if no longer needed
-- ALTER TABLE platform_settings DROP COLUMN IF EXISTS google_service_account_json;
