- Add pkd_code, pkd_description columns for business activity classification - Add business_start_date column from CEIDG - Add owner_first_name, owner_last_name for JDG companies - Create import script scripts/import_ceidg_to_db.py - Add PKD card display in company profile template - Add owner section for JDG companies without KRS - Track SQL migrations in git (database/migrations/*.sql) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
21 lines
1.2 KiB
SQL
21 lines
1.2 KiB
SQL
-- 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';
|