Multi-Source Integration Phase 1.1 thin-delta migrations. Gap audit showed 80%+ of planned schema already in 014/017/020/026/028/029/030/031 — this PR adds only the missing pieces: - 040 houses_extend: complex_id + avito_validated_at + cian_validated_at - 041 house_sources_noop: COMMENT aliases for ext_source/ext_id/matched_method - 042 listing_sources_price_divergence_idx: partial index for /search - 043 house_reviews_extend: likes column - 044 external_valuations_link: house_id/listing_id FKs + low/high price band - 045 house_placement_history_extend: source_confidence + notes + 3-col UNIQUE - 046 views: v_price_divergence + v_cross_source_health + v_data_quality All BEGIN/COMMIT, IF NOT EXISTS, FK ON DELETE CASCADE. Idempotent — safe re-apply on prod. Refs Master Plan sec 1, 4-8 + Cross_Source_Matching sec 2-4.
14 lines
458 B
PL/PgSQL
14 lines
458 B
PL/PgSQL
-- 043_house_reviews_extend.sql
|
|
-- Purpose: Add 'likes' column to house_reviews per Cross_Source_Matching sec 15.
|
|
-- Table itself exists in 014 with richer split (text_main/pros/cons vs single "text").
|
|
-- Dependencies: 014_house_reviews.sql
|
|
|
|
BEGIN;
|
|
|
|
ALTER TABLE house_reviews
|
|
ADD COLUMN IF NOT EXISTS likes int;
|
|
|
|
COMMENT ON COLUMN house_reviews.likes IS
|
|
'Likes/helpful count from source (Cian / Yandex). NULL for Avito (not exposed).';
|
|
|
|
COMMIT;
|