fix(tradein): 095 drop v_data_quality before dropping sale_type_text — RED deploy (#731) #903
No reviewers
Labels
No labels
admin
analytics
auth
automation
bug
business
chore
ci
compliance
data
data-moat
docs
duplicate
dx
enhancement
Fable 5 ревью
feedback/max
generative
GG-форсайт
needs-discussion
needs-human
observability
pause-bots
performance
priority/p0
priority/p1
priority/p2
priority/p3
scope/backend
scope/db
scope/devops
scope/frontend
scope/qa
scrapers
security
site-finder
stage/1
stage/2
status/blocked
status/done
status/needs-analysis
status/needs-fix
status/qa
status/ready
status/review
status/wip
tech-debt
tradein
ux
week ревью 1
wontfix
вторичка
ИРД
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#903
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/731-sale-type-text-view-dep"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
🔴 Hotfix — prod deploy is currently RED
The 2026-05-31 13:50 deploy failed applying migration 095:
This aborts the deploy → migrations 095, 096, 097 are NOT applied on prod (only 092–094 are). The demo-critical 094 (cadastral_unify) applied fine earlier; nothing demo-blocking is broken, but the deploy pipeline is stuck red until 095 is fixed.
Root cause
v_data_quality(recreated in 094) has a CTESELECT * FROM listings. Postgres records a column-level dependency on every listings column fromSELECT *— includingsale_type_text— even though it's not an output column. So a bareALTER TABLE listings DROP COLUMN sale_type_textis blocked. The original #731 spec caught the 2 code refs but missed this view dep (same class of trap as #732).Fix
DROP VIEW v_data_quality→DROP COLUMN sale_type_text→ recreate the view with the identical 094 DDL (after the column is gone,SELECT *simply no longer includes it). Verifiedv_data_qualityis the only object doingSELECT * FROM listings(listings_search_mvandv_price_divergenceuse explicit columns) → no second dependency will surface.Why edit the merged 095 in place
095 never applied on prod (BEGIN…ERROR → transaction rolled back atomically; it's not in
_schema_migrations). The runner re-runs the corrected file on the next deploy. A new098would NOT work — the runner hits 095 first and keeps failing.Test plan
v_data_quality094 def has nosale_type_textoutput; grep confirms only it doesSELECT * FROM listings. Idempotent (DROP … IF EXISTS+CREATE OR REPLACE)._schema_migrationsnow contains 095/096/097;SELECT 1 FROM v_data_qualityok;information_schema.columnshas nolistings.sale_type_text.Please merge ASAP to unblock the deploy. Refs #731