Skip to content

D12 · Database tests run on the real Supabase stack

Accepted · 2026-10-02 · zuki · Partly superseded by D25 (the stub clause)

Decision: SQL tests are pgTAP and run with pnpm supabase test db on the local Supabase stack, on Postgres 17, the version new Supabase projects run; config.toml and CI match the v2 projects. The CI database job runs supabase start, db reset, supabase test db, pnpm db:types and git diff --exit-code. It is triggered by a path filter on supabase/** and tools/db/**, not by Turborepo's affected graph, because supabase/ is not a package. The plain-Postgres stub is deleted once the 44 M0 checks pass as pgTAP.

Why: M0 was tested only on plain Postgres 16 with a stand-in auth schema. Storage policies, the auth trigger and Supabase's role grants have never run for real.