Compare commits

..

No commits in common. "f87f3a15d39ad9a9f946721d3552bf70c1f429e5" and "df83e0256b428cfb855b0e5e478ab7549c8daa93" have entirely different histories.

View file

@ -5,14 +5,8 @@
-- The live market sub-score uses sat_score = min(100, sold_pct * 100 / 70) directly,
-- so sat_factor double-counts absorption without being applied anywhere.
-- All code references removed in the same commit as this migration.
--
-- NB: ALTER TABLE *IF EXISTS* — district_economics is created by the site-finder
-- pipeline (09_macro_and_trend.py / server.py), NOT by data/sql migrations, so it may
-- be absent on the main Postgres. Without IF EXISTS the deploy fails with
-- "relation district_economics does not exist" (DROP COLUMN IF EXISTS only guards the
-- column, not the table). Idempotent + safe when the table is absent.
BEGIN;
ALTER TABLE IF EXISTS district_economics DROP COLUMN IF EXISTS sat_factor;
ALTER TABLE district_economics DROP COLUMN IF EXISTS sat_factor;
COMMIT;