-- Migration 104: add competitor_ambiguous evidence type
--
-- Ambiguous competitor status is a deliberate research outcome. It means TIP
-- found one or more plausible candidates, but cannot prove a safe 1:1 match.
-- Store this as evidence instead of leaving products in an endless queue.

ALTER TABLE transceiver_verification_evidence
  DROP CONSTRAINT IF EXISTS transceiver_verification_evidence_verification_type_check;

ALTER TABLE transceiver_verification_evidence
  ADD CONSTRAINT transceiver_verification_evidence_verification_type_check
  CHECK (
    verification_type::text = ANY (
      ARRAY[
        'price'::varchar,
        'image'::varchar,
        'details'::varchar,
        'competitor_match'::varchar,
        'competitor_no_match'::varchar,
        'competitor_ambiguous'::varchar,
        'artifact_quarantine'::varchar
      ]::text[]
    )
  );
