-- Migration 080 — Avaya, Advantech
--
-- All URLs verified HTTP 200 (2026-04-21).
--
-- Avaya:
--   ERS 4950GTS-PWR+: planetrefurbished.com Shopify CDN (84KB JPEG).
--     No accessible image on avaya.com or support.avaya.com (both 403 / JS-only).
--     planetrefurbished.com is a legitimate secondary-market reseller with clean
--     Shopify CDN URLs. Versioned URL, stable.
--
-- Advantech:
--   EKI-7720G-4FI: advdownload.advantech.com official product CDN (58KB PNG).
--     Advantech hosts primary product photos on advdownload.advantech.com in the
--     /productfile/PIS/{MODEL}/Product%20-%20Photo(Main)/ path. Confirmed 200 OK.
--
--   EKI-9516G-4GMXP: advdownload.advantech.com official product CDN (42KB JPEG).
--     Note: The Advantech catalog spells this product "EKI-9516G-4GMPX" (P and X
--     transposed vs. the DB entry "GMXP"). The image is for the same EN50155 M12
--     industrial switch hardware; the DB model name is a seed-data typo. Using the
--     closest confirmed product photo (EKI-9516G-4GMPX front-left view).
--
-- Still pending (no confirmed 200 OK image found):
--   FiberHome CiTRANS 680: fiberhome.com returns 403; no distributor listing found.
--   NEC PF5248: nec.com returns 403; no accessible third-party image found.
--   Phoenix Contact FL SWITCH 7528-2S: phoenixcontact.com 403; part not indexed.
--   QCT QuantaMesh T7064-IX1D: qct.io product page removed (EOL).

-- ── Avaya ─────────────────────────────────────────────────────────────────────

-- ERS 4950GTS-PWR+ — 48×1G + 2×10G SFP+ PoE managed enterprise switch
UPDATE switches
SET image_url        = 'https://planetrefurbished.com/cdn/shop/files/0_50e13b86-5f6d-47e3-9509-8bfa45dc88ec.jpg?v=1743178385&width=1500',
    product_page_url = COALESCE(product_page_url, 'https://support.avaya.com/products/P0160/ethernet-routing-switch-4900-series'),
    assets_scraped_at = NOW()
WHERE model = 'ERS 4950GTS-PWR+'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'avaya');

-- ── Advantech ─────────────────────────────────────────────────────────────────

-- EKI-7720G-4FI — 16×1G RJ-45 + 4×1G SFP industrial managed Ethernet switch
UPDATE switches
SET image_url        = 'https://advdownload.advantech.com/productfile/PIS/EKI-7720G-4FI/Product%20-%20Photo(Main)/EKI-7720G-4F-4FI_S20160921112046.png',
    product_page_url = COALESCE(product_page_url, 'https://www.advantech.com/en-us/products/1-2mlk6e/eki-7720g-4fi/mod_eab42c44-c8b6-4e11-a3c1-5cb2f793afe2'),
    assets_scraped_at = NOW()
WHERE model = 'EKI-7720G-4FI'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'advantech');

-- EKI-9516G-4GMXP — EN50155 M12 16×1G managed industrial railway switch
-- Note: DB model name "GMXP" is a seed-data typo; Advantech catalog uses "GMPX".
-- Image is the EKI-9516G-4GMPX front-left product photo (same hardware).
UPDATE switches
SET image_url        = 'https://advdownload.advantech.com/productfile/PIS/EKI-9516G-4GMPX/Product%20-%20Photo(Main)/EKI-9516G-4GMPX_Front-Left_S20200319193153.jpg',
    product_page_url = COALESCE(product_page_url, 'https://www.advantech.com/en-us/products/network-infrastructure/managed-switch/sub_managed-industrial-switches'),
    assets_scraped_at = NOW()
WHERE model = 'EKI-9516G-4GMXP'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'advantech');
