transceiver-db/sql/094-cisco-8000-mpa-a9k-flex-images.sql
Rene Fichtmueller ba998f4c01 fix: vendor_compat 0%→100%, price denorm, wiitek disabled, price-denorm scheduler
- Migration 094: images for 12 Cisco 8K MPA + A9K-8HG-FLEX + ASR-9000V models
- Migration 095: price denorm refresh (EUR 679→1376, USD 166→835 with 180d window)
- Migration 096: bulk vendor_compat by form_factor — all 9013 transceivers now
  have OEM compatibility patterns (was 0/9013 because all slugs are scraped-*)
- wiitek.ts: disable dead scraper (wiitek.com unreachable since 2026-04, EAI_AGAIN)
- scheduler.ts: add compute:price-denorm job (daily 05:30 UTC) to keep
  street_price_usd/price_verified_eur fresh without manual migration runs
- seed-from-npm.ts: ON CONFLICT now also updates vendor_compat (was only updated_at)
2026-04-25 08:55:21 +02:00

110 lines
7.3 KiB
SQL

-- Migration 094: Cisco 8K-MPA series + A9K-8HG-FLEX + misc image backfill
-- Models: 8K-MPA-4D, 8K-MPA-16H, 8K-MPA-16Z2D, A9K-8HG-FLEX-FC, A9K-8HG-FLEX-SE,
-- A9K-8HG-FLEX-TR, A9K-400G-DWDM-TR, N9348Y12C-SE1, NC55-36X100G-A-SE,
-- ASR-9000V-24-A, ASR-9000V-DC-E, ASR-9922-RP-TR
-- Sources: manuals.plus (Cisco 8700 HIG figures), networkgenetics.net (BigCommerce),
-- teksavers.com, cisco.com/c/dam, inteleca.com (BigCommerce),
-- stack-systems.com (Magento CDN), it-market.com
-- Coverage: +12 models (~650 → 662 estimated)
-- Note: 8K-MPA-18Z1D skipped — product too new, no accessible reseller/CDN image found.
-- ASR-9000V-24-A uses ASR-9000V-AC image (bundle SKU, identical chassis).
-- A9K-8HG-FLEX-FC uses TR image (FC/SE/TR are identical hardware, license-only difference).
-- NC55-36X100G-A-SE uses -BA variant image (same physical PCB, different optics license).
-- 8K-MPA-4D: manuals.plus Cisco 8700 HIG Figure 4 (88KB PNG, unique PCB photo)
UPDATE switches
SET image_url = 'https://manuals.plus/wp-content/uploads/2022/12/FIG-4-cisco-8700-modular-port-adapters-hardware-installation-guide.png',
product_page_url = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/8000-series-routers/index.html'),
assets_scraped_at = NOW()
WHERE model = '8K-MPA-4D'
AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');
-- 8K-MPA-16H: manuals.plus Cisco 8700 HIG Figure 7 (91KB PNG, unique PCB photo)
UPDATE switches
SET image_url = 'https://manuals.plus/wp-content/uploads/2022/12/FIG-7-cisco-8700-modular-port-adapters-hardware-installation-guide.png',
product_page_url = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/8000-series-routers/index.html'),
assets_scraped_at = NOW()
WHERE model = '8K-MPA-16H'
AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');
-- 8K-MPA-16Z2D: manuals.plus Cisco 8700 HIG Figure 10 (89KB PNG, unique PCB photo)
UPDATE switches
SET image_url = 'https://manuals.plus/wp-content/uploads/2022/12/FIG-10-cisco-8700-modular-port-adapters-hardware-installation-guide.png',
product_page_url = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/8000-series-routers/index.html'),
assets_scraped_at = NOW()
WHERE model = '8K-MPA-16Z2D'
AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');
-- A9K-8HG-FLEX-FC: networkgenetics.net BigCommerce CDN (321KB PNG, product-specific front photo)
-- FC/SE/TR are identical hardware units; only the software license differs
UPDATE switches
SET image_url = 'https://cdn11.bigcommerce.com/s-e692hdujm7/images/stencil/1280x1280/products/9599/13077/Screen%5FShot%5F2024-05-16%5Fat%5F12.10.29%5FPM%5F%5F78724.1715879628.png?c=2',
product_page_url = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/asr-9000-series-aggregation-services-routers/index.html'),
assets_scraped_at = NOW()
WHERE model = 'A9K-8HG-FLEX-FC'
AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');
-- A9K-8HG-FLEX-SE: networkgenetics.net BigCommerce CDN (321KB PNG, same hardware as FC/TR)
UPDATE switches
SET image_url = 'https://cdn11.bigcommerce.com/s-e692hdujm7/images/stencil/1280x1280/products/9599/13077/Screen%5FShot%5F2024-05-16%5Fat%5F12.10.29%5FPM%5F%5F78724.1715879628.png?c=2',
product_page_url = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/asr-9000-series-aggregation-services-routers/index.html'),
assets_scraped_at = NOW()
WHERE model = 'A9K-8HG-FLEX-SE'
AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');
-- A9K-8HG-FLEX-TR: networkgenetics.net BigCommerce CDN (321KB PNG, product-specific front photo)
UPDATE switches
SET image_url = 'https://cdn11.bigcommerce.com/s-e692hdujm7/images/stencil/1280x1280/products/9599/13077/Screen%5FShot%5F2024-05-16%5Fat%5F12.10.29%5FPM%5F%5F78724.1715879628.png?c=2',
product_page_url = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/asr-9000-series-aggregation-services-routers/index.html'),
assets_scraped_at = NOW()
WHERE model = 'A9K-8HG-FLEX-TR'
AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');
-- A9K-400G-DWDM-TR: teksavers.com product photo (78KB PNG, verified)
UPDATE switches
SET image_url = 'https://www.teksavers.com/media/catalog/product/cache/a99f2b4b01cf8c5c2cfc3d0e49e4e12a/a/9/a9k-400g-dwdm-tr.png',
product_page_url = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/asr-9000-series-aggregation-services-routers/index.html'),
assets_scraped_at = NOW()
WHERE model = 'A9K-400G-DWDM-TR'
AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');
-- N9348Y12C-SE1: Cisco official DAM image (145KB PNG, N9300 SE1 series datasheet photo)
UPDATE switches
SET image_url = 'https://www.cisco.com/c/dam/en/us/products/collateral/switches/nexus-9000-series-switches/nb-06-nexus-93-se1-aag-cte-en.docx/_jcr_content/renditions/nb-06-nexus-93-se1-aag-cte-en_0.png',
product_page_url = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/switches/nexus-9000-series-switches/index.html'),
assets_scraped_at = NOW()
WHERE model = 'N9348Y12C-SE1'
AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');
-- NC55-36X100G-A-SE: inteleca.com BigCommerce CDN (69KB JPEG, -BA variant same PCB)
UPDATE switches
SET image_url = 'https://cdn11.bigcommerce.com/s-4yguupzb2p/images/stencil/1280x1280/products/NC55-36X100G-BA-SE/main/NC55-36X100G-BA-SE__01234.jpg?c=2',
product_page_url = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/network-convergence-system-5500-series/index.html'),
assets_scraped_at = NOW()
WHERE model = 'NC55-36X100G-A-SE'
AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');
-- ASR-9000V-24-A: stack-systems.com Magento CDN (ASR-9000V-AC chassis, bundle SKU = same hardware)
UPDATE switches
SET image_url = 'https://stack-systems.com/media/catalog/product/cache/4ccf3122b2d4a5eb47d88ec1c5d09b3d/a/s/asr-9000v-ac.jpg',
product_page_url = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/asr-9000-series-aggregation-services-routers/index.html'),
assets_scraped_at = NOW()
WHERE model = 'ASR-9000V-24-A'
AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');
-- ASR-9000V-DC-E: it-market.com product photo (verified)
UPDATE switches
SET image_url = 'https://it-market.com/media/20/12/05/1702071778/asr-9000v-dc-e.jpg',
product_page_url = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/asr-9000-series-aggregation-services-routers/index.html'),
assets_scraped_at = NOW()
WHERE model = 'ASR-9000V-DC-E'
AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');
-- ASR-9922-RP-TR: networkgenetics.net BigCommerce CDN (verified JPEG)
UPDATE switches
SET image_url = 'https://cdn11.bigcommerce.com/s-e692hdujm7/images/stencil/1280x1280/products/9622/13118/ASR-9922-RP-TR__78456.1715880012.jpg?c=2',
product_page_url = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/asr-9000-series-aggregation-services-routers/index.html'),
assets_scraped_at = NOW()
WHERE model = 'ASR-9922-RP-TR'
AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');