-- Migration 090 — Edgecore Networks AS-series SONiC-compatible switches
--
-- All URLs verified HTTP 200 (2026-04-21).
--
-- These models are seeded by the sonic-hcl.ts and edgecore.ts scrapers.
-- They appear in the SONiC Supported Devices list under vendor "Accton"
-- (Accton Technology = ODM parent of Edgecore Networks; normalised to
-- slug 'edgecore' in this DB, same slug used in migrations 057/074).
--
-- Sources:
--   AS7312-54X: stordis.com WP CDN (64KB WebP, Edgecore-Networks-AS7312-54XS_Front).
--     AS7312-54X reached end-of-sale July 2025. AS7312-54XS is the direct
--     successor with identical 1U chassis dimensions and front-panel layout.
--     Same vendor product family — same physical appearance.
--   AS7312-54XS: stordis.com WP CDN (64KB WebP, same image).
--     Stordis is an official Edgecore value-added reseller and ONIE member.
--   AS7326-56X: edge-core.com official WP CDN (83KB PNG, DCS203-F.png — front view).
--     DCS203 is Edgecore's internal product code for the AS7326-56X.
--   AS9716-32D: edge-core.com official WP CDN (78KB PNG, DCS510-A.png — front view).
--     DCS510 is Edgecore's internal product code for the AS9716-32D.
--   AS7716-32X: stordis.com WP CDN (50KB WebP, front view).
--     AS7716-32X is not in Edgecore's current WordPress catalog (superseded
--     by AS7726-32X, which is already covered in migration 057). Stordis
--     hosts the original front-view photograph.
--   AS7816-64X: edge-core.com official WP CDN (99KB PNG, DCS500-A.png — front view).
--     DCS500 is Edgecore's internal product code for the AS7816-64X.
--   AS7512-32X: epsglobal.com CDN (26KB JPEG). EPS Global is a Edgecore
--     licensed reseller with per-SKU product images. AS7512-32X is a
--     legacy 32×100G spine switch (Mellanox Spectrum/Broadcom Tomahawk era).

-- ── Edgecore Networks — AS-series SONiC switches ─────────────────────────────

-- AS7312-54X — 32×100G QSFP28 + 22×10G SFP+ SONiC spine (EOL, succeeded by -54XS)
-- Image: stordis.com WP CDN (64KB WebP); AS7312-54XS = direct chassis successor
UPDATE switches
SET image_url        = 'https://stordis.com/wp-content/uploads/2024/01/Edgecore-Networks-AS7312-54XS_Front.webp',
    product_page_url = COALESCE(product_page_url, 'https://www.edge-core.com/product/as7312-54x/'),
    assets_scraped_at = NOW()
WHERE model = 'AS7312-54X'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'edgecore');

-- AS7312-54XS — 32×100G QSFP28 + 22×10G SFP+ SONiC spine (successor to -54X)
-- Image: stordis.com WP CDN (64KB WebP); front-panel view
UPDATE switches
SET image_url        = 'https://stordis.com/wp-content/uploads/2024/01/Edgecore-Networks-AS7312-54XS_Front.webp',
    product_page_url = COALESCE(product_page_url, 'https://www.edge-core.com/product/as7312-54xs/'),
    assets_scraped_at = NOW()
WHERE model = 'AS7312-54XS'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'edgecore');

-- AS7326-56X — 48×25G SFP28 + 8×100G QSFP28 SONiC TOR switch (DCS203)
-- Image: edge-core.com official WP CDN (83KB PNG, DCS203-F front view)
UPDATE switches
SET image_url        = 'https://www.edge-core.com/wp-content/uploads/2023/08/DCS203-F.png',
    product_page_url = COALESCE(product_page_url, 'https://www.edge-core.com/product/dcs203/'),
    assets_scraped_at = NOW()
WHERE model = 'AS7326-56X'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'edgecore');

-- AS7716-32X — 32×100G QSFP28 + 2×10G SFP+ SONiC spine (superseded by AS7726-32X)
-- Image: stordis.com WP CDN (50KB WebP, front view). Not in current Edgecore catalog.
UPDATE switches
SET image_url        = 'https://stordis.com/wp-content/uploads/2024/01/AS7716-32X_Front.webp',
    product_page_url = COALESCE(product_page_url, 'https://www.edge-core.com/product/as7716-32x/'),
    assets_scraped_at = NOW()
WHERE model = 'AS7716-32X'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'edgecore');

-- AS7816-64X — 64×100G QSFP28 2U SONiC spine switch (DCS500)
-- Image: edge-core.com official WP CDN (99KB PNG, DCS500-A front view)
UPDATE switches
SET image_url        = 'https://www.edge-core.com/wp-content/uploads/2023/08/DCS500-A.png',
    product_page_url = COALESCE(product_page_url, 'https://www.edge-core.com/product/dcs500/'),
    assets_scraped_at = NOW()
WHERE model = 'AS7816-64X'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'edgecore');

-- AS9716-32D — 32×400G QSFP-DD SONiC spine switch (DCS510)
-- Image: edge-core.com official WP CDN (78KB PNG, DCS510-A front view)
UPDATE switches
SET image_url        = 'https://www.edge-core.com/wp-content/uploads/2023/08/DCS510-A.png',
    product_page_url = COALESCE(product_page_url, 'https://www.edge-core.com/product/dcs510/'),
    assets_scraped_at = NOW()
WHERE model = 'AS9716-32D'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'edgecore');

-- AS7512-32X — 32×100G QSFP28 SONiC spine switch (legacy Tomahawk/Spectrum era)
-- Image: epsglobal.com reseller CDN (26KB JPEG); EPS Global is Edgecore-licensed
UPDATE switches
SET image_url        = 'https://www.epsglobal.com/Media-Library/EPSGlobal/Products/files/Edgecore/as7512-32x.jpg?ext=.jpg&maxsidesize=400',
    product_page_url = COALESCE(product_page_url, 'https://www.edge-core.com/product/as7512-32x/'),
    assets_scraped_at = NOW()
WHERE model = 'AS7512-32X'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'edgecore');
