feat(gbp): Add Places API columns to persist enrichment data
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions

google_primary_type, google_editorial_summary, google_price_level,
google_attributes, google_reviews_data, google_photos_metadata

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Maciej Pienczyn 2026-02-08 14:05:23 +01:00
parent f459a6fee2
commit 137f45d0c6
2 changed files with 18 additions and 0 deletions

View File

@ -1147,6 +1147,14 @@ class CompanyWebsiteAnalysis(Base):
legacy_image_count = Column(Integer) # JPG + PNG + GIF images count legacy_image_count = Column(Integer) # JPG + PNG + GIF images count
modern_image_ratio = Column(Numeric(5, 2)) # % of images in modern formats modern_image_ratio = Column(Numeric(5, 2)) # % of images in modern formats
# === GOOGLE PLACES API ENRICHMENT ===
google_primary_type = Column(String(100)) # Places API: primary business type
google_editorial_summary = Column(Text) # Places API: Google's curated description
google_price_level = Column(String(50)) # Places API: PRICE_LEVEL_* enum
google_attributes = Column(JSONB) # Places API: business attributes
google_reviews_data = Column(JSONB) # Places API: reviews with text/rating
google_photos_metadata = Column(JSONB) # Places API: photo references
# === SEO AUDIT METADATA === # === SEO AUDIT METADATA ===
seo_audit_version = Column(String(20)) # Version of SEO audit script used seo_audit_version = Column(String(20)) # Version of SEO audit script used
seo_audited_at = Column(DateTime) # Timestamp of last SEO audit seo_audited_at = Column(DateTime) # Timestamp of last SEO audit

View File

@ -0,0 +1,10 @@
-- Migration 061: Add Google Places API enrichment columns to company_website_analysis
-- These columns store data from Places API (New) collected during GBP audit
-- Required for displaying Places data on GBP audit dashboard
ALTER TABLE company_website_analysis ADD COLUMN google_primary_type VARCHAR(100);
ALTER TABLE company_website_analysis ADD COLUMN google_editorial_summary TEXT;
ALTER TABLE company_website_analysis ADD COLUMN google_price_level VARCHAR(50);
ALTER TABLE company_website_analysis ADD COLUMN google_attributes JSONB;
ALTER TABLE company_website_analysis ADD COLUMN google_reviews_data JSONB;
ALTER TABLE company_website_analysis ADD COLUMN google_photos_metadata JSONB;