-- Migration 063: Add Google Search Console (OAuth) columns to company_website_analysis
-- These columns persist GSC data collected via OAuth during SEO audits

ALTER TABLE company_website_analysis ADD COLUMN IF NOT EXISTS gsc_clicks INTEGER;
ALTER TABLE company_website_analysis ADD COLUMN IF NOT EXISTS gsc_impressions INTEGER;
ALTER TABLE company_website_analysis ADD COLUMN IF NOT EXISTS gsc_ctr NUMERIC(5,2);
ALTER TABLE company_website_analysis ADD COLUMN IF NOT EXISTS gsc_avg_position NUMERIC(5,1);
ALTER TABLE company_website_analysis ADD COLUMN IF NOT EXISTS gsc_top_queries JSONB;
ALTER TABLE company_website_analysis ADD COLUMN IF NOT EXISTS gsc_period_days INTEGER DEFAULT 28;
