-- 042_listing_sources_price_divergence_idx.sql
-- Purpose: Add price-divergence index (Master Plan sec 5.1 idx #9).
--          listing_sources columns/canonical/merged_into already provisioned in 028 + 029.
-- Dependencies: 028_matching_tables.sql, 029_extend_matching_valuation_dynamics.sql

BEGIN;

CREATE INDEX IF NOT EXISTS listing_sources_price_divergence_idx
  ON listing_sources (listing_id, price_rub)
  WHERE price_rub IS NOT NULL;

COMMIT;
