Verify database schema matches code queries before deploying. Catches missing columns, broken joins, schema drift. Use before every deploy that touches DB queries.
Before deploying code that changes database queries, verify the schema exists.
.select('...') in Supabase queries — do those columns exist?.from('table') — does the table exist?.select('..., relation:other_table(...)')) — does the FK relationship exist?# List columns in a table
curl -s "${SUPABASE_URL}/rest/v1/dnu_cities?select=*&limit=0" \
-H "apikey: ${SUPABASE_KEY}" -I | grep -i "content-profile"
# Or query information_schema
# SELECT column_name FROM information_schema.columns WHERE table_name = 'dnu_cities';
If code references a column that doesn't exist in the database, the deploy MUST include a migration that adds it. No exceptions.
Silent return [] on Supabase errors hides these failures. The cities page was empty for this reason on 2026-04-05.
Before merging any PR that modifies a .select() or .from() call: