-- Migration 088 — Ubiquiti UniFi USW-Enterprise-48-PoE, USW-Aggregation,
--                  Phoenix Contact FL SWITCH 7528-2S
--
-- All URLs verified HTTP 200 (2026-04-21).
--
-- Sources:
--   USW-Enterprise-48-PoE / USW-Aggregation: cdn.ecomm.ui.com (Ubiquiti
--     official e-commerce CDN). Product image UUIDs extracted from store.ui.com
--     product pages. The same CDN pattern is used for all previously covered
--     UniFi switches (migrations 071 et al.). USW-Enterprise-48-PoE 331KB PNG,
--     USW-Aggregation 285KB PNG.
--   FL SWITCH 7528-2S: rspsupply.com product image CDN (94KB JPEG).
--     Phoenix Contact's own website returns 503 for direct image access.
--     RSP Supply (rspsupply.com) is a Phoenix Contact authorised distributor
--     with stable per-SKU product image hosting keyed by Phoenix Contact's
--     own product ID (2891026). Same pattern used in migration 079 for
--     FL SWITCH 4808E-16FX-4GC (product ID 2891079).

-- ── Ubiquiti ──────────────────────────────────────────────────────────────────

-- USW-Enterprise-48-PoE — UniFi Switch Enterprise 48 PoE (48×GbE, 4×10G SFP+)
-- Image: cdn.ecomm.ui.com (331KB PNG)
UPDATE switches
SET image_url        = 'https://cdn.ecomm.ui.com/products/81802ee3-ab5d-46f6-b6f7-2abbe2a5968b/8fd2135e-27fc-43ec-8cf5-b2806d2ba696.png',
    product_page_url = COALESCE(product_page_url, 'https://store.ui.com/us/en/pro/category/switching-enterprise/products/usw-enterprise-48-poe'),
    assets_scraped_at = NOW()
WHERE model = 'USW-Enterprise-48-PoE'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'ubiquiti');

-- USW-Aggregation — UniFi Switch Aggregation (8×10G SFP+)
-- Image: cdn.ecomm.ui.com (285KB PNG)
UPDATE switches
SET image_url        = 'https://cdn.ecomm.ui.com/products/1c748fb1-b4df-43ef-83e0-d5ed26f9db7c/0247dd12-2dba-44c7-a717-626992874181.png',
    product_page_url = COALESCE(product_page_url, 'https://store.ui.com/us/en/pro/category/switching-aggregation/products/usw-aggregation'),
    assets_scraped_at = NOW()
WHERE model = 'USW-Aggregation'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'ubiquiti');

-- ── Phoenix Contact ───────────────────────────────────────────────────────────

-- FL SWITCH 7528-2S — Phoenix Contact FL SWITCH 7500 series 28-port industrial switch
-- Image: RSP Supply authorised distributor CDN (94KB JPEG), keyed by Phoenix
--   Contact product ID 2891026 (same pattern as migration 079 / product 2891079)
UPDATE switches
SET image_url        = 'https://rspsupply.com/images/product/large/Phoenix-2891026.jpg',
    product_page_url = COALESCE(product_page_url, 'https://www.phoenixcontact.com/en-US/products/ethernet-switch-fl-switch-7528-2s-2891026/'),
    assets_scraped_at = NOW()
WHERE model = 'FL SWITCH 7528-2S'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'phoenix-contact');
