21f7e306ee docs(cli): align declarative schema and diff engine docs with CLI behavior (#51609)
## Problem

Four docs pages describe CLI behavior that v2.120.0 no longer has. A
reader following them hits a wrong result in three places.

- The declarative guide tells legacy-engine users who ran `db pull
--declarative` to delete the exported tree. The command also rewrites
`[db.migrations].schema_paths` in `config.toml`, so `db diff` keeps
failing after the delete. The guide also claims the failure happens "on
the first file". The code does not guarantee that.
- The declarative directory moved from `supabase/database` to
`supabase/schemas` in v2.115.0. The CLI warns when it finds a tree at
the old path. No page mentions the move or the warning, and the `db
schema declarative sync` example in the command reference still prints
the old path.
- The command reference marks `--experimental` as required on the
declarative commands. `[experimental.pgdelta] enabled = true` also
unlocks them.

Two smaller gaps: the diff engines page shows how to fall back to
`migra` for one run but not how to try `pg-delta` for one run, and the
guide omits the note `db diff -f` prints when it ignores schema files.

Every claim was checked against the CLI source on `develop` and the
v2.120.0 tag.

## Solution

Docs-only change. Four files, 17 insertions, 8 deletions.

- `declarative-database-schemas.mdx`: corrects the legacy caution,
documents the pre-2.115.0 directory and its warning, adds the `db diff
-f` note.
- `diff-engines.mdx`: adds the single-run opt-in table (`db diff
--use-pg-delta`, `db pull --diff-engine pg-delta`, `--experimental` for
the declarative commands) and the `SUPABASE_EXPERIMENTAL_PG_DELTA`
override. Updates the legacy `db pull --declarative` row. Prettier
realigned the comparison table, which accounts for most of that page's
diff.
- `cli_v1_config.yaml`: `schema_paths` notes the automatic rewrite on
`migra` and the warning on `pg-delta`. `declarative_schema_path` notes
the pre-2.115.0 default.
- `cli_v1_commands.yaml`: fixes the example path and drops `required:
true` from `--experimental` on the two declarative commands. Both match
the spec the CLI generator produces from `develop`.

The command reference is generated from the CLI repo, so the same fixes
are in supabase/cli as a separate PR. Without that, the next release's
reference update reverts them here.

## Review instructions

1. Open the preview for
`/docs/guides/local-development/declarative-database-schemas` and search
for "schema_paths". The legacy caution should say the command rewrites
the setting and tell readers to remove it.
2. On the same page, search for "2.115.0". The directory note should
name the version and both fixes.
3. Open the preview for `/docs/guides/local-development/diff-engines`
and search for "single run". The opt-in table should render, and the
comparison table below it should still align.
4. Open the CLI reference for `db schema declarative sync`. The second
example should print `supabase/schemas`, and `--experimental` should not
show as required.
5. Open the config reference entries for `db.migrations.schema_paths`
and `experimental.pgdelta.declarative_schema_path` and read the added
sentences.
6. Optional source check in supabase/cli `develop`:
`updateDeclarativeSchemaPathsConfig` in
`apps/cli/src/commands/db/shared/pgdelta.write.ts` and
`apps/cli/src/commands/db/schema/declarative/declarative.former-default.ts`
back the two main claims.

## Checklist

Check all before review:

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [x] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)

---------

Co-authored-by: avallete <andrew.valleteau@supabase.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 10:53:16 +00:00
2025-06-17 11:08:46 +02:00
2024-01-10 13:34:41 +01:00
2021-07-25 12:45:26 +08:00
2026-09-29 18:32:27 +03:00

Supabase

Supabase is the Postgres development platform. We're building the features of Firebase using enterprise-grade open source tools.

  • Hosted Postgres Database. Docs
  • Authentication and Authorization. Docs
  • Auto-generated APIs.
  • Functions.
    • Database Functions. Docs
    • Edge Functions Docs
  • File Storage. Docs
  • AI + Vector/Embeddings Toolkit. Docs
  • Dashboard

Supabase Dashboard

Watch "releases" of this repo to get notified of major updates.

Watch this repo

Documentation

For full documentation, visit supabase.com/docs

To see how to Contribute, visit Getting Started

Community & Support

  • Community Forum. Best for: help with building, discussion about database best practices.
  • GitHub Issues. Best for: bugs and errors you encounter using Supabase.
  • Email Support. Best for: problems with your database or infrastructure.
  • Discord. Best for: sharing your applications and hanging out with the community.

How it works

Supabase is a combination of open source tools. We’re building the features of Firebase using enterprise-grade, open source products. If the tools and communities exist, with an MIT, Apache 2, or equivalent open license, we will use and support that tool. If the tool doesn't exist, we build and open source it ourselves. Supabase is not a 1-to-1 mapping of Firebase. Our aim is to give developers a Firebase-like developer experience using open source tools.

Architecture

Supabase is a hosted platform. You can sign up and start using Supabase without installing anything. You can also self-host and develop locally.

Architecture

  • Postgres is an object-relational database system with over 30 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance.
  • Realtime is an Elixir server that allows you to listen to PostgreSQL inserts, updates, and deletes using websockets. Realtime polls Postgres' built-in replication functionality for database changes, converts changes to JSON, then broadcasts the JSON over websockets to authorized clients.
  • PostgREST is a web server that turns your PostgreSQL database directly into a RESTful API.
  • GoTrue is a JWT-based authentication API that simplifies user sign-ups, logins, and session management in your applications.
  • Storage a RESTful API for managing files in S3, with Postgres handling permissions.
  • pg_graphql a PostgreSQL extension that exposes a GraphQL API.
  • postgres-meta is a RESTful API for managing your Postgres, allowing you to fetch tables, add roles, and run queries, etc.
  • Envoy is a cloud-native, high-performance edge and service proxy.

Client libraries

Our approach for client libraries is modular. Each sub-library is a standalone implementation for a single external system. This is one of the ways we support existing tools.

Language Client Feature-Clients (bundled in Supabase client)
Supabase PostgREST GoTrue Realtime Storage Functions
⚡️ Official ⚡️
JavaScript (TypeScript) supabase-js postgrest-js auth-js realtime-js storage-js functions-js
Flutter supabase-flutter postgrest supabase_auth supabase_realtime supabase_storage supabase_functions
Swift supabase-swift postgrest-swift auth-swift realtime-swift storage-swift functions-swift
Python supabase-py postgrest-py gotrue-py realtime-py storage-py functions-py
💚 Community 💚
C# supabase-csharp postgrest-csharp gotrue-csharp realtime-csharp storage-csharp functions-csharp
Go - postgrest-go gotrue-go - storage-go functions-go
Java - - gotrue-java - storage-java -
Kotlin supabase-kt postgrest-kt auth-kt realtime-kt storage-kt functions-kt
Ruby supabase-rb postgrest-rb - - - -
Rust - postgrest-rs - - - -
Godot Engine (GDScript) supabase-gdscript - - - - -

Badges

Made with Supabase

[![Made with Supabase](https://supabase.com/badge-made-with-supabase.svg)](https://supabase.com)
<a href="https://supabase.com">
  <img
    width="168"
    height="30"
    src="https://supabase.com/badge-made-with-supabase.svg"
    alt="Made with Supabase"
  />
</a>

Made with Supabase (dark)

[![Made with Supabase](https://supabase.com/badge-made-with-supabase-dark.svg)](https://supabase.com)
<a href="https://supabase.com">
  <img
    width="168"
    height="30"
    src="https://supabase.com/badge-made-with-supabase-dark.svg"
    alt="Made with Supabase"
  />
</a>

Translations

Languages
TypeScript 59.6%
MDX 21.7%
JavaScript 17.5%
CSS 0.5%
Shell 0.4%
Other 0.2%