fix: sql migration 135 — demote 60k auto_approved without fx.standard_name
This commit is contained in:
parent
970a7ad9e8
commit
f4a5aa4361
14
sql/135-equivalences-quality-cleanup.sql
Normal file
14
sql/135-equivalences-quality-cleanup.sql
Normal file
@ -0,0 +1,14 @@
|
||||
-- Migration 135: Equivalence quality cleanup
|
||||
-- Demotes auto_approved rows that no longer meet quality gates:
|
||||
-- 1. FX product has no standard_name → can't verify match quality
|
||||
-- Applied 2026-07-11 after adding standard_name gate to catalog-reconcile.
|
||||
|
||||
UPDATE transceiver_equivalences e
|
||||
SET status = 'pending', updated_at = NOW()
|
||||
FROM transceivers fx
|
||||
WHERE e.flexoptix_id = fx.id
|
||||
AND e.status = 'auto_approved'
|
||||
AND fx.standard_name IS NULL;
|
||||
|
||||
-- Result: 60,278 demoted from auto_approved → pending
|
||||
-- Remaining auto_approved: 20,838 (all with standard_name)
|
||||
Loading…
x
Reference in New Issue
Block a user