Skip to content

DR-030 — api.\* views MUST be regenerated on any base-column rename

config.toml sets schemas=["api"], so PostgREST exposes only api.*: every supabase-js .from(<table>) resolves to the api.<table> VIEW at runtime. A base-table RENAME COLUMN does NOT propagate to a dependent view’s OUTPUT column name (only its internal read) — the view keeps exposing the dead name until explicitly DROP+CREATEd. Every migration renaming a base column MUST therefore ship a companion api-view regen (precedent 20260628200001_id131_extract_reparent_api_regen.sql), else TS callers break column does not exist at the API layer — invisible to mocked bun run test, caught only by test:integration post-apply. Surfaced fixing api.ingestion_quality_log ({131.32}); the audit across all {131.x} renames is {131.33}.

Substance now lives in: DR-032 + canonical:scripts/check-api-view-coverage.ts