-- Migration 047 — Moxa product images (direct CDN URL injection)
--
-- CDN base: cdn-cms-frontdoor-dfc8ebanh6bkb3hs.a02.azurefd.net
-- Path pattern: /en/getattachment/Products/INDUSTRIAL-NETWORK-INFRASTRUCTURE/...
--
-- ⚠️  Hotlink-protected: CDN requires Referer: https://www.moxa.com/
--    Images will not display directly from third-party domains.
--    Use Cloudflare Worker proxy or download to R2 for production display.
--
-- All URLs verified HTTP 200 with correct Referer (2026-04-21).

-- EDS-518E — Layer-2 Managed Switch (8 + 2-port)
UPDATE switches
SET image_url        = 'https://cdn-cms-frontdoor-dfc8ebanh6bkb3hs.a02.azurefd.net/en/getattachment/Products/INDUSTRIAL-NETWORK-INFRASTRUCTURE/Ethernet-Switches/Layer-2-Managed-Switches/EDS-518E-Series/moxa-eds-518e-series-image-1-(1).jpg',
    product_page_url = COALESCE(product_page_url, 'https://www.moxa.com/en/products/industrial-network-infrastructure/ethernet-switches/layer-2-managed-switches/eds-518e-series'),
    assets_scraped_at = NOW()
WHERE model = 'EDS-518E'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'moxa');

-- EDS-G4014 — Layer-2 Managed Switch (14-port Gigabit)
UPDATE switches
SET image_url        = 'https://cdn-cms-frontdoor-dfc8ebanh6bkb3hs.a02.azurefd.net/en/getattachment/Products/INDUSTRIAL-NETWORK-INFRASTRUCTURE/Ethernet-Switches/Layer-2-Managed-Switches/EDS-G4014-Series/moxa-eds-g4014-series-image-(1).jpg',
    product_page_url = COALESCE(product_page_url, 'https://www.moxa.com/en/products/industrial-network-infrastructure/ethernet-switches/layer-2-managed-switches/eds-g4014-series'),
    assets_scraped_at = NOW()
WHERE model = 'EDS-G4014'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'moxa');

-- ICS-G7826A — Rackmount Industrial Managed Switch (26-port)
UPDATE switches
SET image_url        = 'https://cdn-cms-frontdoor-dfc8ebanh6bkb3hs.a02.azurefd.net/en/getattachment/Products/INDUSTRIAL-NETWORK-INFRASTRUCTURE/Ethernet-Switches/Rackmount-Switches/ICS-G7826A-Series/moxa-ics-g7826a-series-image-(1).jpg',
    product_page_url = COALESCE(product_page_url, 'https://www.moxa.com/en/products/industrial-network-infrastructure/ethernet-switches/rackmount-switches/ics-g7826a-series'),
    assets_scraped_at = NOW()
WHERE model = 'ICS-G7826A'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'moxa');

-- IKS-G6824A — Rackmount Industrial Managed Switch (24-port)
UPDATE switches
SET image_url        = 'https://cdn-cms-frontdoor-dfc8ebanh6bkb3hs.a02.azurefd.net/en/getattachment/Products/INDUSTRIAL-NETWORK-INFRASTRUCTURE/Ethernet-Switches/Rackmount-Switches/IKS-G6824A-Series/moxa-iks-g6824a-series-image-(1).jpg',
    product_page_url = COALESCE(product_page_url, 'https://www.moxa.com/en/products/industrial-network-infrastructure/ethernet-switches/rackmount-switches/iks-g6824a-series'),
    assets_scraped_at = NOW()
WHERE model = 'IKS-G6824A'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'moxa');
