-- Migration: Add Google Business Profile fields to company_website_analysis
-- Date: 2026-01-09
-- Purpose: Store all GBP data fetched from Google Places API for accurate auditing

-- Add new columns for Google data
ALTER TABLE company_website_analysis
ADD COLUMN IF NOT EXISTS google_name VARCHAR(255),
ADD COLUMN IF NOT EXISTS google_address VARCHAR(500),
ADD COLUMN IF NOT EXISTS google_phone VARCHAR(50),
ADD COLUMN IF NOT EXISTS google_website VARCHAR(500),
ADD COLUMN IF NOT EXISTS google_types TEXT[],
ADD COLUMN IF NOT EXISTS google_maps_url VARCHAR(500);

-- Add comment for documentation
COMMENT ON COLUMN company_website_analysis.google_name IS 'Business name from Google Places API';
COMMENT ON COLUMN company_website_analysis.google_address IS 'Formatted address from Google Places API';
COMMENT ON COLUMN company_website_analysis.google_phone IS 'Phone number from Google Places API';
COMMENT ON COLUMN company_website_analysis.google_website IS 'Website URL from Google Places API';
COMMENT ON COLUMN company_website_analysis.google_types IS 'Business types/categories from Google Places API';
COMMENT ON COLUMN company_website_analysis.google_maps_url IS 'Google Maps URL for the business';
