Some checks failed
Deploy Trade-In / build-backend (push) Blocked by required conditions
Deploy Trade-In / deploy (push) Blocked by required conditions
Deploy Trade-In / changes (push) Successful in 4s
Deploy Trade-In / build-frontend (push) Has been skipped
Deploy Trade-In / test (push) Has been cancelled
Co-authored-by: bot-backend <bot-backend@gendsgn.local> Co-committed-by: bot-backend <bot-backend@gendsgn.local>
24 lines
1.1 KiB
PL/PgSQL
24 lines
1.1 KiB
PL/PgSQL
-- 095_dead_schema.sql
|
||
-- Purpose: Удаление мёртвой схемы (верифицированный безопасный подмножество аудита TradeinDb_Audit_May30).
|
||
--
|
||
-- Контекст (Issue #731):
|
||
-- sale_type_text: столбец 100% NULL в listings, code refs удалены в том же PR.
|
||
-- audit_log: 0 строк, 0 python refs, триггеры не зависят (верифицировано).
|
||
--
|
||
-- Idempotency:
|
||
-- ALTER TABLE ... DROP COLUMN IF EXISTS — безопасен при повторном запуске.
|
||
-- DROP TABLE IF EXISTS — безопасен при повторном запуске.
|
||
--
|
||
-- Явно НЕ удаляем: houses_price_dynamics, agents, sellers, estimate_photos,
|
||
-- house_reviews, listings_snapshots.
|
||
|
||
BEGIN;
|
||
|
||
-- #731: drop dead schema (verified-safe subset of TradeinDb_Audit_May30)
|
||
-- sale_type_text: 100% NULL in listings, code refs removed in same PR
|
||
ALTER TABLE IF EXISTS listings DROP COLUMN IF EXISTS sale_type_text;
|
||
|
||
-- audit_log: 0 rows, 0 python refs, no triggers depend on it (verified)
|
||
DROP TABLE IF EXISTS audit_log;
|
||
|
||
COMMIT;
|