Major additions: - Multi-state expansion: states table, StateSelector, NationalDashboard, StateHeatmap, CrossStateCompare - Orchestrator services: trace service, error taxonomy, retry manager, proxy rotator - Discovery system: dutchie discovery service, geo validation, city seeding scripts - Analytics infrastructure: analytics v2 routes, brand/pricing/stores intelligence pages - Local development: setup-local.sh starts all 5 services (postgres, backend, cannaiq, findadispo, findagram) - Migrations 037-056: crawler profiles, states, analytics indexes, worker metadata Frontend pages added: - Discovery, ChainsDashboard, IntelligenceBrands, IntelligencePricing, IntelligenceStores - StateHeatmap, CrossStateCompare, SyncInfoPanel Components added: - StateSelector, OrchestratorTraceModal, WorkflowStepper 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
28 lines
1021 B
PL/PgSQL
28 lines
1021 B
PL/PgSQL
-- Migration 045: Add thumbnail_url columns to canonical tables
|
|
--
|
|
-- NOTE: image_url already exists in both tables from migration 041.
|
|
-- This migration adds thumbnail_url for cached thumbnail images.
|
|
|
|
DO $$
|
|
BEGIN
|
|
-- Add thumbnail_url to store_products if not exists
|
|
IF NOT EXISTS (
|
|
SELECT 1 FROM information_schema.columns
|
|
WHERE table_name = 'store_products' AND column_name = 'thumbnail_url'
|
|
) THEN
|
|
ALTER TABLE store_products ADD COLUMN thumbnail_url TEXT NULL;
|
|
END IF;
|
|
|
|
-- Add thumbnail_url to store_product_snapshots if not exists
|
|
IF NOT EXISTS (
|
|
SELECT 1 FROM information_schema.columns
|
|
WHERE table_name = 'store_product_snapshots' AND column_name = 'thumbnail_url'
|
|
) THEN
|
|
ALTER TABLE store_product_snapshots ADD COLUMN thumbnail_url TEXT NULL;
|
|
END IF;
|
|
END;
|
|
$$ LANGUAGE plpgsql;
|
|
|
|
COMMENT ON COLUMN store_products.thumbnail_url IS 'URL to cached thumbnail image';
|
|
COMMENT ON COLUMN store_product_snapshots.thumbnail_url IS 'URL to cached thumbnail image at time of snapshot';
|