-- Migration 079 — WAGO, WatchGuard, ADTRAN, Phoenix Contact
--
-- All URLs verified HTTP 200 (2026-04-21).
--
-- WAGO:
--   852-1505: gilautomation.com Shopify CDN (64KB JPEG, 480px).
--     wago.com CDN returns 403 on direct access (hot-link protection).
--     gilautomation.com is an authorized WAGO distributor with stable versioned
--     Shopify CDN URL. Product ID in URL: 0200001c0003cd22000200b6-DE.
--
-- WatchGuard:
--   Firebox M5800: watchguard.com official help-center CDN (1MB PNG).
--     watchguard.com/sites/default/* returns 404 for this model.
--     Help-center docs serve the hardware guide front-panel image at the
--     stable path below; confirmed 200 OK from the M5800 hardware guide.
--
-- ADTRAN:
--   NetVanta 1560-48P: portal.adtran.com ProductCatalog CDN (32KB JPEG).
--     adtran.com/en/* redirects 301 → 404 for product images post-ADVA merger.
--     portal.adtran.com (legacy product portal) still serves product photos
--     from the ProductCatalog/Products/Images path. Part 17108148PF2.
--
-- Phoenix Contact:
--   FL SWITCH 4808E-16FX-4GC: rspsupply.com (88KB JPEG, large size).
--     phoenixcontact.com returns 403 for all direct image paths.
--     rspsupply.com (authorized industrial distributor) hosts the image at
--     a stable /images/product/large/ path. Phoenix Contact part: 2891079.
--
-- Still pending (no confirmed 200 OK image found):
--   FL SWITCH 7528-2S: part number not publicly indexed; phoenixcontact.com 403.

-- ── WAGO ─────────────────────────────────────────────────────────────────────

-- 852-1505 — 8-port 1G + 4-slot SFP managed industrial PoE switch
UPDATE switches
SET image_url        = 'https://www.gilautomation.com/cdn/shop/products/0200001c0003cd22000200b6-DE_480x.jpg?v=1614262620',
    product_page_url = COALESCE(product_page_url, 'https://www.wago.com/global/interface-modules/managed-switches/managed-switch/p/852-1505'),
    assets_scraped_at = NOW()
WHERE model = '852-1505'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'wago');

-- ── WatchGuard ────────────────────────────────────────────────────────────────

-- Firebox M5800 — 2U rackmount enterprise firewall (8-slot modular, 40G capable)
-- Image source: official WatchGuard hardware guide front-panel photo (1MB PNG)
UPDATE switches
SET image_url        = 'https://www.watchguard.com/help/docs/help-center/en-US/Content/en-US/Hardware-Guides/Images/M5800/M5800_Front.png',
    product_page_url = COALESCE(product_page_url, 'https://www.watchguard.com/wgrd-products/rack-mount/firebox-m4800-m5800'),
    assets_scraped_at = NOW()
WHERE model = 'Firebox M5800'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'watchguard');

-- ── ADTRAN ────────────────────────────────────────────────────────────────────

-- NetVanta 1560-48P — 48×1G + 4×SFP+ + 24-port PoE managed enterprise switch
-- Image from portal.adtran.com ProductCatalog (32KB JPEG, part 17108148PF2)
UPDATE switches
SET image_url        = 'https://portal.adtran.com/ProductCatalog/Products/Images/Alternate/17108148PF2_1.jpg',
    product_page_url = COALESCE(product_page_url, 'https://portal.adtran.com/web/page/portal/Adtran/product/17108148PF2/48'),
    assets_scraped_at = NOW()
WHERE model = 'NetVanta 1560-48P'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'adtran');

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

-- FL SWITCH 4808E-16FX-4GC — 16×100M FX + 4×1G Ethernet managed industrial switch
-- Image from rspsupply.com (88KB JPEG, Phoenix Contact part 2891079, large size)
UPDATE switches
SET image_url        = 'https://rspsupply.com/images/product/large/Phoenix-2891079.jpg',
    product_page_url = COALESCE(product_page_url, 'https://www.phoenixcontact.com/en-us/products/switch-fl-switch-4808e-16fx-4gc-2891079'),
    assets_scraped_at = NOW()
WHERE model = 'FL SWITCH 4808E-16FX-4GC'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'phoenix-contact');
