supaschema owns generation, safety gates, generated outputs, and guarded apply orchestration.
In this setup, supaschema sync uses the Supabase CLI adapter by default. The existing Supabase CLI project link, access token, project ref, and database password remain the credential lane. Use supabase db push directly only when a separate deployment process intentionally owns apply.
Use this when
- The repository already has a
supabase/directory. - Migrations should stay in
supabase/migrations. - Schema files should live in
supabase/schemas. - Platform schemas such as
auth,storage, andrealtimeshould stay protected.
Do this
Use the scaffolded Supabase defaults or set the same paths insupaschema.config.json:
sync. For remote deploys, set one remote target to mode: "auto" and provide the target’s approval environment variable in the deployment job. Multiple automatic targets are refused before any runner can mutate a database. Use --target <name> only for an explicit one-target operator override.
Verify
Use bare PostgreSQL plus Supabase stubs for disposable verification:Related
Docker-free diff
Generate Supabase migrations without a local stack.
Sync command
Run safety gates, target reconciliation, and selected runner apply.
Migrations command
Reconcile disk files with applied history.
RLS safety
Review policy predicate changes explicitly.

