-- RateRight Growth Engine - Company Links Migration
-- Adds website, ABN, and social media fields to company_intel
-- Run this in Supabase SQL Editor

-- Add website URL
ALTER TABLE company_intel
ADD COLUMN IF NOT EXISTS website_url TEXT;

-- Add Australian Business Number
ALTER TABLE company_intel
ADD COLUMN IF NOT EXISTS abn VARCHAR(20);

-- Add LinkedIn company page URL
ALTER TABLE company_intel
ADD COLUMN IF NOT EXISTS linkedin_url TEXT;

-- Add Facebook business page URL
ALTER TABLE company_intel
ADD COLUMN IF NOT EXISTS facebook_url TEXT;

-- Verify columns were added
SELECT column_name, data_type
FROM information_schema.columns
WHERE table_name = 'company_intel'
AND column_name IN ('website_url', 'abn', 'linkedin_url', 'facebook_url');
